Removed unneeded "count" variable in utmpdump.c.

Fixed typo in accidental wrote_wtmp_rlevel == 0 || wrote_wtmp_rlevel
comparison so the latter is wrote_utmp_rlevel.

Simplified logic in mountpoint.c when testing for same device or same inode.

Thanks to David Binderman for pointing out the above three issues.
This commit is contained in:
Jesse Smith
2018-03-30 22:15:04 -03:00
parent e02e001f7a
commit d9b6475d85
4 changed files with 19 additions and 5 deletions

View File

@@ -2228,7 +2228,7 @@ void redo_utmp_wtmp(void)
if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0))
write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~");
if ((wrote_wtmp_rlevel == 0) || (wrote_wtmp_rlevel == 0))
if ((wrote_wtmp_rlevel == 0) || (wrote_utmp_rlevel == 0))
write_utmp_wtmp("runlevel", "~~", thislevel + 256 * prevlevel, RUN_LVL, "~");
}