]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-otv.c
Use more the ND_TTEST_1() macro
[tcpdump] / print-otv.c
index f4daacfa63086a45a8ef0065a0c83cb88224afae..502f93e419810c0aea6c68c85c48b5d4bdee4dcd 100644 (file)
@@ -49,8 +49,8 @@ otv_print(netdissect_options *ndo, const u_char *bp, u_int len)
     if (len < OTV_HDR_LEN)
         goto trunc;
 
-    ND_TCHECK(*bp);
-    flags = *bp;
+    ND_TCHECK_1(bp);
+    flags = EXTRACT_U_1(bp);
     ND_PRINT((ndo, "flags [%s] (0x%02x), ", flags & 0x08 ? "I" : ".", flags));
     bp += 1;
 
@@ -63,7 +63,7 @@ otv_print(netdissect_options *ndo, const u_char *bp, u_int len)
     bp += 3;
 
     /* Reserved */
-    ND_TCHECK(*bp);
+    ND_TCHECK_1(bp);
     bp += 1;
 
     ether_print(ndo, bp, len - OTV_HDR_LEN, ndo->ndo_snapend - bp, NULL, NULL);