From: Guy Harris Date: Mon, 4 Sep 2017 07:42:14 +0000 (-0700) Subject: Squelch a warning. X-Git-Tag: tcpdump-4.99-bp~1999 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/c78c62101075211fa43ca816fb68966a2a6adc88 Squelch a warning. poll() is a system API on UN*Xes, so calling a variable "poll" causes "declaration of 'poll' shadows a global declaration" warnings in some compilers. Call the argument "poll_interval" instead. --- diff --git a/print-ntp.c b/print-ntp.c index 177eed22..79bff24b 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -466,14 +466,14 @@ p_ntp_delta(netdissect_options *ndo, /* Prints polling interval in log2 as seconds or fraction of second */ static void p_poll(netdissect_options *ndo, - register const int poll) + register const int poll_interval) { - if (poll <= -32 || poll >= 32) + if (poll_interval <= -32 || poll_interval >= 32) return; - if (poll >= 0) - ND_PRINT((ndo, " (%us)", 1U << poll)); + if (poll_interval >= 0) + ND_PRINT((ndo, " (%us)", 1U << poll_interval)); else - ND_PRINT((ndo, " (1/%us)", 1U << -poll)); + ND_PRINT((ndo, " (1/%us)", 1U << -poll_interval)); }