summaryrefslogtreecommitdiffstats
path: root/sbin/ping
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2003-07-14 12:43:48 +0000
committermaxim <maxim@FreeBSD.org>2003-07-14 12:43:48 +0000
commit230bc843b2e53b8c66a790ee880fa6533a878144 (patch)
tree85523982b77994faa6908334a88429b98ad96f4e /sbin/ping
parente6a55d01024c08591f3c3237c256184eeac0a3e8 (diff)
downloadFreeBSD-src-230bc843b2e53b8c66a790ee880fa6533a878144.zip
FreeBSD-src-230bc843b2e53b8c66a790ee880fa6533a878144.tar.gz
o Rename local variables, do not shadow global declarations.
Diffstat (limited to 'sbin/ping')
-rw-r--r--sbin/ping/ping.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 6e6c88b..cf01858 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1545,17 +1545,17 @@ pr_retip(ip)
}
static char *
-pr_ntime (n_time time)
+pr_ntime (n_time timestamp)
{
static char buf[10];
- int h, m, s;
+ int hour, min, sec;
- s = ntohl(time) / 1000;
- h = s / 60 / 60;
- m = (s % (60 * 60)) / 60;
- s = (s % (60 * 60)) % 60;
+ sec = ntohl(timestamp) / 1000;
+ hour = sec / 60 / 60;
+ min = (sec % (60 * 60)) / 60;
+ sec = (sec % (60 * 60)) % 60;
- (void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d", h, m, s);
+ (void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d", hour, min, sec);
return (buf);
}
OpenPOWER on IntegriCloud