diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-09-19 19:58:58 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-09-19 19:58:58 +0200 |
commit | c62dff3187a3a4dd98e24d3bcb2a18aa3736bfd4 (patch) | |
tree | fde2fc10da0a24180f9cce45b431a269b4ae9a96 /print-pgm.c | |
parent | 327512e264fc30a8969ac5f7415e2d3a172c9b42 (diff) | |
download | tcpdump-c62dff3187a3a4dd98e24d3bcb2a18aa3736bfd4.tar.gz |
Fix a warning
poll() is a system API on UN*Xes, some compilers warn like:
./print-pgm.c: In function 'pgm_print':
./print-pgm.c:256:29: warning: declaration of 'poll' shadows a global
declaration [-Wshadow]
Rename the variable 'pgm_poll'.
Diffstat (limited to 'print-pgm.c')
-rw-r--r-- | print-pgm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/print-pgm.c b/print-pgm.c index a7ac64a8..6926be23 100644 --- a/print-pgm.c +++ b/print-pgm.c @@ -253,14 +253,14 @@ pgm_print(netdissect_options *ndo, } case PGM_POLL: { - const struct pgm_poll *poll; + const struct pgm_poll *pgm_poll; uint32_t ivl, rnd, mask; - poll = (const struct pgm_poll *)(pgm + 1); - ND_TCHECK_SIZE(poll); - bp = (const u_char *) (poll + 1); + pgm_poll = (const struct pgm_poll *)(pgm + 1); + ND_TCHECK_SIZE(pgm_poll); + bp = (const u_char *) (pgm_poll + 1); - switch (GET_BE_U_2(poll->pgmp_nla_afi)) { + switch (GET_BE_U_2(pgm_poll->pgmp_nla_afi)) { case AFNUM_INET: ND_TCHECK_LEN(bp, sizeof(nd_ipv4)); addrtostr(bp, nla_buf, sizeof(nla_buf)); @@ -289,8 +289,8 @@ pgm_print(netdissect_options *ndo, bp += sizeof(uint32_t); ND_PRINT("POLL seq %u round %u nla %s ivl %u rnd 0x%08x " - "mask 0x%08x", GET_BE_U_4(poll->pgmp_seq), - GET_BE_U_2(poll->pgmp_round), nla_buf, ivl, rnd, + "mask 0x%08x", GET_BE_U_4(pgm_poll->pgmp_seq), + GET_BE_U_2(pgm_poll->pgmp_round), nla_buf, ivl, rnd, mask); break; } |