From 887019fbbc8d59bb130beaae63aef573dea44e91 Mon Sep 17 00:00:00 2001 From: Antoine Brodin Date: Mon, 17 Mar 2008 18:31:43 +0000 Subject: [PATCH] Initialize variable "now" before using it (it is used by the LEFTEARTH macro) PR: 121418 Submitted by: Atsuo Ohki Approved by: rwatson (mentor) MFC after: 1 month --- usr.bin/ruptime/ruptime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index f0778ea3f4c2..1e3356f6f86c 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -191,6 +191,7 @@ ruptime(const char *host, int aflg, int (*cmp)(const void *, const void *)) rewinddir(dirp); hsp = NULL; maxloadav = -1; + (void)time(&now); for (nhosts = hspace = 0; (dp = readdir(dirp)) != NULL;) { if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5) != 0) continue; @@ -239,7 +240,6 @@ ruptime(const char *host, int aflg, int (*cmp)(const void *, const void *)) warnx("host %s not in %s", host, _PATH_RWHODIR); } - (void)time(&now); qsort(hs, nhosts, sizeof(hs[0]), cmp); for (i = 0; i < (int)nhosts; i++) { hsp = &hs[i];