]> The Tcpdump Group git mirrors - tcpdump/blobdiff - smbutil.c
NDOize OpenFlow, IEEE slow and telnet decoders
[tcpdump] / smbutil.c
index 13333d00e471bb072ed3336b8037f79d1bbd7cc6..da8612324fb2f5dc6f174d1b3bca48ef747d2cd3 100644 (file)
--- a/smbutil.c
+++ b/smbutil.c
@@ -298,7 +298,7 @@ print_data(const unsigned char *buf, int len)
        while (n--)
            printf("   ");
 
-       n = SMBMIN(8, i % 16);
+       n = min(8, i % 16);
        print_asc(&buf[i - (i % 16)], n);
        printf(" ");
        n = (i % 16) - n;
@@ -329,7 +329,7 @@ write_bits(unsigned int val, const char *fmt)
     }
 }
 
-/* convert a UCS2 string into iso-8859-1 string */
+/* convert a UCS-2 string into an ASCII string */
 #define MAX_UNISTR_SIZE        1000
 static const char *
 unistr(const u_char *s, u_int32_t *len, int use_unicode)
@@ -384,7 +384,7 @@ unistr(const u_char *s, u_int32_t *len, int use_unicode)
            TCHECK(s[0]);
            if (l >= MAX_UNISTR_SIZE)
                break;
-           if (isprint(s[0]))
+           if (ND_ISPRINT(s[0]))
                buf[l] = s[0];
            else {
                if (s[0] == 0)
@@ -400,7 +400,7 @@ unistr(const u_char *s, u_int32_t *len, int use_unicode)
            TCHECK2(s[0], 2);
            if (l >= MAX_UNISTR_SIZE)
                break;
-           if (s[1] == 0 && isprint(s[0])) {
+           if (s[1] == 0 && ND_ISPRINT(s[0])) {
                /* It's a printable ASCII character */
                buf[l] = s[0];
            } else {