]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-arp.c
Simplify some expressions
[tcpdump] / print-arp.c
index 7c57870a20b38f48c245d20ffa60d460a6e7365b..174ecaf13ffaf0a38e567e60a4d23d6a323857c3 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "netdissect.h"
 #include "addrtoname.h"
-#include "ether.h"
 #include "ethertype.h"
 #include "extract.h"
 
@@ -181,7 +180,7 @@ static int
 isnonzero(const u_char *a, size_t len)
 {
        while (len > 0) {
-               if (*a != 0)
+               if (EXTRACT_U_1(a) != 0)
                        return (1);
                a++;
                len--;
@@ -266,7 +265,7 @@ atmarp_print(netdissect_options *ndo,
        pro = ATMPRO(ap);
        op = ATMOP(ap);
 
-       if (!ND_TTEST2(*aar_tpa(ap), ATMTPROTO_LEN(ap))) {
+       if (!ND_TTEST_LEN(aar_tpa(ap), ATMTPROTO_LEN(ap))) {
                ND_PRINT((ndo, "%s", tstr));
                ND_DEFAULTPRINT((const u_char *)ap, length);
                return;
@@ -385,7 +384,7 @@ arp_print(netdissect_options *ndo,
             break;
        }
 
-       if (!ND_TTEST2(*TPA(ap), PROTO_LEN(ap))) {
+       if (!ND_TTEST_LEN(TPA(ap), PROTO_LEN(ap))) {
                ND_PRINT((ndo, "%s", tstr));
                ND_DEFAULTPRINT((const u_char *)ap, length);
                return;