mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 12:03:44 +08:00
BOOTP: Move macro define/undef outsite functions
This avoid some Coccinelle warnings: CPP-DEFINE: inside function, I treat it as comment CPP-UNDEF: inside function, I treat it as comment This also makes the code a bit clearer.
This commit is contained in:
parent
ff1c209392
commit
f5eb55fa6d
@ -1061,6 +1061,10 @@ trunc:
|
||||
ND_PRINT((ndo, "|[rfc1048]"));
|
||||
}
|
||||
|
||||
#define PRINTCMUADDR(m, s) { ND_TCHECK(cmu->m); \
|
||||
if (cmu->m.s_addr != 0) \
|
||||
ND_PRINT((ndo, " %s:%s", s, ipaddr_string(ndo, &cmu->m.s_addr))); }
|
||||
|
||||
static void
|
||||
cmu_print(netdissect_options *ndo,
|
||||
const u_char *bp)
|
||||
@ -1068,10 +1072,6 @@ cmu_print(netdissect_options *ndo,
|
||||
const struct cmu_vend *cmu;
|
||||
uint8_t v_flags;
|
||||
|
||||
#define PRINTCMUADDR(m, s) { ND_TCHECK(cmu->m); \
|
||||
if (cmu->m.s_addr != 0) \
|
||||
ND_PRINT((ndo, " %s:%s", s, ipaddr_string(ndo, &cmu->m.s_addr))); }
|
||||
|
||||
ND_PRINT((ndo, " vend-cmu"));
|
||||
cmu = (const struct cmu_vend *)bp;
|
||||
|
||||
@ -1092,9 +1092,10 @@ cmu_print(netdissect_options *ndo,
|
||||
|
||||
trunc:
|
||||
ND_PRINT((ndo, "%s", tstr));
|
||||
#undef PRINTCMUADDR
|
||||
}
|
||||
|
||||
#undef PRINTCMUADDR
|
||||
|
||||
static char *
|
||||
client_fqdn_flags(u_int flags)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user