]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udld.c
Merge pull request #467 from wessels/master
[tcpdump] / print-udld.c
index f846a884472bef54c7b553717425f57bfa098e5d..fd6fdf9177fe3f80b60e3e2f1a20736559675833 100644 (file)
@@ -18,7 +18,6 @@
  * Original code by Carles Kishimoto <[email protected]>
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -89,8 +88,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     tptr = pptr;
 
-    if (!ND_TTEST2(*tptr, UDLD_HEADER_LEN))
-       goto trunc;
+    ND_TCHECK2(*tptr, UDLD_HEADER_LEN);
 
     code = UDLD_EXTRACT_OPCODE(*tptr);
 
@@ -115,8 +113,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     while (tptr < (pptr+length)) {
 
-        if (!ND_TTEST2(*tptr, 4))
-            goto trunc;
+        ND_TCHECK2(*tptr, 4);
 
        type = EXTRACT_16BITS(tptr);
         len  = EXTRACT_16BITS(tptr+2);