]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-telnet.c
Use more the ND_TTEST_1() macro
[tcpdump] / print-telnet.c
index 8ff527b4849d1ca02b4fe7f00f48c8bc3815aa39..41e24462e199caa9ed1a1be0015e595caff1b2ca 100644 (file)
@@ -443,8 +443,8 @@ telnet_parse(netdissect_options *ndo, const u_char *sp, u_int length, int print)
                                break;
                        p++;
                }
-               ND_TCHECK(*p);
-               if (*p != IAC)
+               ND_TCHECK_1(p);
+               if (EXTRACT_U_1(p) != IAC)
                        goto pktend;
 
                switch (x) {
@@ -515,7 +515,7 @@ telnet_print(netdissect_options *ndo, const u_char *sp, u_int length)
 
        osp = sp;
 
-       ND_TCHECK(*sp);
+       ND_TCHECK_1(sp);
        while (length > 0 && EXTRACT_U_1(sp) == IAC) {
                /*
                 * Parse the Telnet command without printing it,
@@ -544,7 +544,7 @@ telnet_print(netdissect_options *ndo, const u_char *sp, u_int length)
 
                sp += l;
                length -= l;
-               ND_TCHECK(*sp);
+               ND_TCHECK_1(sp);
        }
        if (!first) {
                if (ndo->ndo_Xflag && 2 < ndo->ndo_vflag)