diff options
Diffstat (limited to 'halt.c')
-rw-r--r-- | halt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/halt.c b/halt.c index 67a11a1..7bb4d35 100644 --- a/halt.c +++ b/halt.c @@ -38,13 +38,13 @@ void write_wtmp(int boot) { utmp.ut_type = boot ? BOOT_TIME : RUN_LVL; - strncpy(utmp.ut_name, boot ? "reboot" : "shutdown", sizeof(utmp.ut_name)); - strncpy(utmp.ut_id , "~~", sizeof(utmp.ut_id)); - strncpy(utmp.ut_line, boot ? "~" : "~~", sizeof(utmp.ut_line)); + strncpy(utmp.ut_name, boot ? "reboot" : "shutdown", sizeof utmp.ut_name); + strncpy(utmp.ut_id , "~~", sizeof utmp.ut_id); + strncpy(utmp.ut_line, boot ? "~" : "~~", sizeof utmp.ut_line); if (uname(&uname_buf) == 0) - strncpy(utmp.ut_host, uname_buf.release, sizeof(utmp.ut_host)); + strncpy(utmp.ut_host, uname_buf.release, sizeof utmp.ut_host); - write(fd, (char *)&utmp, sizeof(utmp)); + write(fd, (char *)&utmp, sizeof utmp); close(fd); if (boot) { |