mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
o Rename local variables, do not shadow global declarations.
This commit is contained in:
parent
0fe0c0cc20
commit
007fe4e38a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117550
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user