about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-09-06 11:19:26 +0200
committerLeah Neukirchen <chneukirchen@gmail.com>2019-09-06 14:40:42 +0200
commit047744cc50cdc2c84cc15374fa87a194ef63d384 (patch)
tree810fe63ffbf337d52469380dd36054d4f0aa1e29
parent59f9de7fc1c8b8eba55564c5c1ec83499bc0a66a (diff)
downloadrunit-void-047744cc50cdc2c84cc15374fa87a194ef63d384.tar.gz
runit-void-047744cc50cdc2c84cc15374fa87a194ef63d384.tar.xz
runit-void-047744cc50cdc2c84cc15374fa87a194ef63d384.zip
halt: style
-rw-r--r--halt.c10
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) {