Skip to content

Commit 047744c

Browse files
halt: style
1 parent 59f9de7 commit 047744c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

halt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ void write_wtmp(int boot) {
3838

3939
utmp.ut_type = boot ? BOOT_TIME : RUN_LVL;
4040

41-
strncpy(utmp.ut_name, boot ? "reboot" : "shutdown", sizeof(utmp.ut_name));
42-
strncpy(utmp.ut_id , "~~", sizeof(utmp.ut_id));
43-
strncpy(utmp.ut_line, boot ? "~" : "~~", sizeof(utmp.ut_line));
41+
strncpy(utmp.ut_name, boot ? "reboot" : "shutdown", sizeof utmp.ut_name);
42+
strncpy(utmp.ut_id , "~~", sizeof utmp.ut_id);
43+
strncpy(utmp.ut_line, boot ? "~" : "~~", sizeof utmp.ut_line);
4444
if (uname(&uname_buf) == 0)
45-
strncpy(utmp.ut_host, uname_buf.release, sizeof(utmp.ut_host));
45+
strncpy(utmp.ut_host, uname_buf.release, sizeof utmp.ut_host);
4646

47-
write(fd, (char *)&utmp, sizeof(utmp));
47+
write(fd, (char *)&utmp, sizeof utmp);
4848
close(fd);
4949

5050
if (boot) {

0 commit comments

Comments
 (0)