]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-l2tp.c
Use more the ND_TTEST_1() macro
[tcpdump] / print-l2tp.c
index 7feab704046931a07fb2870d0b1ca3a8164ebbda..eb92833b6a8601fc50af7a5bd71563410ccb65e2 100644 (file)
@@ -396,7 +396,7 @@ l2tp_q931_cc_print(netdissect_options *ndo, const u_char *dat, u_int length)
                return;
        }
        print_16bits_val(ndo, (const uint16_t *)dat);
-       ND_PRINT((ndo, ", %02x", dat[2]));
+       ND_PRINT((ndo, ", %02x", EXTRACT_U_1(dat + 2)));
        dat += 3;
        length -= 3;
        if (length != 0) {
@@ -619,7 +619,7 @@ l2tp_avp_print(netdissect_options *ndo, const u_char *dat, int length)
 
        /* If it goes past the end of the remaining length of the captured
           data, we'll give up. */
-       ND_TCHECK2(*ptr, len);
+       ND_TCHECK_LEN(ptr, len);
 
        /*
         * After this point, we don't need to check whether we go past