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
This commit is contained in:
parent
afe5acff1b
commit
887019fbbc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177316
@ -191,6 +191,7 @@ ruptime(const char *host, int aflg, int (*cmp)(const void *, const void *))
|
|||||||
rewinddir(dirp);
|
rewinddir(dirp);
|
||||||
hsp = NULL;
|
hsp = NULL;
|
||||||
maxloadav = -1;
|
maxloadav = -1;
|
||||||
|
(void)time(&now);
|
||||||
for (nhosts = hspace = 0; (dp = readdir(dirp)) != NULL;) {
|
for (nhosts = hspace = 0; (dp = readdir(dirp)) != NULL;) {
|
||||||
if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5) != 0)
|
if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5) != 0)
|
||||||
continue;
|
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);
|
warnx("host %s not in %s", host, _PATH_RWHODIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)time(&now);
|
|
||||||
qsort(hs, nhosts, sizeof(hs[0]), cmp);
|
qsort(hs, nhosts, sizeof(hs[0]), cmp);
|
||||||
for (i = 0; i < (int)nhosts; i++) {
|
for (i = 0; i < (int)nhosts; i++) {
|
||||||
hsp = &hs[i];
|
hsp = &hs[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user