]> The Tcpdump Group git mirrors - tcpdump/commitdiff
BOOTP: Fix parentheses errors
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 6 Jan 2018 21:25:45 +0000 (22:25 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 6 Jan 2018 21:26:06 +0000 (22:26 +0100)
These errors were not previously detected because of the use of
the single argument, double parentheses ND_PRINT() macro.

print-bootp.c

index 92577eaf64f6db3a3e653af896f4eb6be69fc891..ba6449bd72c89155e98aa067a62ae8b4cdb47c5c 100644 (file)
@@ -299,7 +299,7 @@ bootp_print(netdissect_options *ndo,
        bp_hlen = EXTRACT_U_1(bp->bp_hlen);
        if (bp_htype == 1 && bp_hlen == 6 && bp_op == BOOTPREQUEST) {
                ND_TCHECK_LEN(bp->bp_chaddr, 6);
-               ND_PRINT((ndo, " from %s", etheraddr_string(ndo, bp->bp_chaddr));
+               ND_PRINT((ndo, " from %s", etheraddr_string(ndo, bp->bp_chaddr)));
        }
 
        ND_PRINT((ndo, ", length %u", length));
@@ -319,7 +319,7 @@ bootp_print(netdissect_options *ndo,
 
        /* Only print interesting fields */
        if (EXTRACT_U_1(bp->bp_hops))
-               ND_PRINT((ndo, ", hops %d", EXTRACT_U_1(bp->bp_hops))));
+               ND_PRINT((ndo, ", hops %d", EXTRACT_U_1(bp->bp_hops)));
        if (EXTRACT_BE_U_4(bp->bp_xid))
                ND_PRINT((ndo, ", xid 0x%x", EXTRACT_BE_U_4(bp->bp_xid)));
        if (EXTRACT_BE_U_2(bp->bp_secs))