]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove unnecessary test.
authorMichal Sekletar <[email protected]>
Fri, 14 Oct 2011 03:10:11 +0000 (20:10 -0700)
committerGuy Harris <[email protected]>
Fri, 14 Oct 2011 03:10:11 +0000 (20:10 -0700)
Also, from me: add a comment explaining why the test isn't being done.

Reviewed-by: Guy Harris <[email protected]>
CREDITS
print-atm.c

diff --git a/CREDITS b/CREDITS
index 205af0fe1a0e3bf78b1600428f6b0103c170cccf..9e7e875769beca4b62440aeaae0800429f6cf0a2 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -127,6 +127,7 @@ Additional people who have contributed patches:
     Michael Shalayeff             <mickey at openbsd dot org>
     Michael Shields               <shields at msrl dot com>
     Michael T. Stolarchuk         <mts at off dot to>
+    Michal Sekletar               <msekleta at redhat dot com>
     Michele "mydecay" Marchetto   <smarchetto1 at tin dot it>
     Mike Frysinger                <vapier at gmail dot com>
     Minto Jeyananth               <minto at juniper dot net>
index 135898bad91a89e2d5ba777eceeed83594f2ad6e..935d182753b800122df6ed4b2165839b1051e81f 100644 (file)
@@ -270,10 +270,12 @@ sig_print(const u_char *p, int caplen)
                printf(":%s ",
                    tok2str(msgtype2str, "msgtype#%d", p[MSG_TYPE_POS]));
 
-               if (caplen < CALL_REF_POS+3) {
-                       printf("[|atm]");
-                       return;
-               }
+               /*
+                * The call reference comes before the message type,
+                * so if we know we have the message type, which we
+                * do from the caplen test above, we also know we have
+                * the call reference.
+                */
                call_ref = EXTRACT_24BITS(&p[CALL_REF_POS]);
                printf("CALL_REF:0x%06x", call_ref);
        } else {