From 007fe4e38ad3ca2cf69e46238368b4cc77b65705 Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Mon, 14 Jul 2003 12:43:48 +0000 Subject: [PATCH] o Rename local variables, do not shadow global declarations. --- sbin/ping/ping.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 6e6c88bdb8c..cf01858e5d4 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); }