]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-domain.c
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / print-domain.c
index 95301a9ffb839f94ca31bacf95b864207584bd05..e150116d84eb8583e346fe08a1757c5dd6e490bf 100644 (file)
@@ -105,7 +105,7 @@ blabel_print(netdissect_options *ndo,
        ND_PRINT((ndo, "\\[x"));
        for (bitp = cp + 1, b = bitlen; bitp < lim && b > 7; b -= 8, bitp++) {
                ND_TCHECK(*bitp);
-               ND_PRINT((ndo, "%02x", *bitp));
+               ND_PRINT((ndo, "%02x", EXTRACT_U_1(bitp)));
        }
        if (b > 4) {
                ND_TCHECK(*bitp);
@@ -338,7 +338,7 @@ ns_qprint(netdissect_options *ndo,
 
        cp = ns_nskip(ndo, cp);
 
-       if (cp == NULL || !ND_TTEST2(*cp, 4))
+       if (cp == NULL || !ND_TTEST_4(cp))
                return(NULL);
 
        /* print the qtype */
@@ -467,7 +467,7 @@ ns_rprint(netdissect_options *ndo,
                break;
        case T_MX:
                ND_PRINT((ndo, " "));
-               if (!ND_TTEST2(*cp, 2))
+               if (!ND_TTEST_2(cp))
                        return(NULL);
                if (ns_nprint(ndo, cp + 2, bp) == NULL)
                        return(NULL);
@@ -486,7 +486,7 @@ ns_rprint(netdissect_options *ndo,
 
        case T_SRV:
                ND_PRINT((ndo, " "));
-               if (!ND_TTEST2(*cp, 6))
+               if (!ND_TTEST_6(cp))
                        return(NULL);
                if (ns_nprint(ndo, cp + 6, bp) == NULL)
                        return(NULL);