about summary refs log tree commit diff
path: root/nitroctl.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-01-23 16:11:53 +0100
committerLeah Neukirchen <leah@vuxu.org>2024-01-23 20:57:39 +0100
commitadc60561cd40bc0d3c19ebc214ab08a6c8986810 (patch)
treeac196fe7f87c2f16dd51002f3424385470930e0d /nitroctl.c
parent36696956948eea74a83c368cd9679a15edd350f0 (diff)
downloadnitro-adc60561cd40bc0d3c19ebc214ab08a6c8986810.tar.gz
nitro-adc60561cd40bc0d3c19ebc214ab08a6c8986810.tar.xz
nitro-adc60561cd40bc0d3c19ebc214ab08a6c8986810.zip
formatting cleanup
Diffstat (limited to 'nitroctl.c')
-rw-r--r--nitroctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nitroctl.c b/nitroctl.c
index 29c8963..61841b3 100644
--- a/nitroctl.c
+++ b/nitroctl.c
@@ -102,7 +102,7 @@ send_and_wait(char cmd, const char *service)
 	sigaction(SIGALRM, &sa, 0);
 	alarm(5);
 
-	while(!timed_out) {
+	while (!timed_out) {
 		ssize_t rd;
 		char buf[64];
 
@@ -161,7 +161,7 @@ normalize(char *service)
 
 	char *end = strrchr(buf, '/');
 	if (strcmp(end, "/log") == 0)
-		while(end > buf && *--end != '/')
+		while (end > buf && *--end != '/')
 			;
 
 	return end + 1;
@@ -183,7 +183,7 @@ void write_wtmp(int boot) {
 	if ((fd = open(OUR_WTMP, O_WRONLY|O_APPEND)) < 0)
 		return;
 
-	struct utmp utmp = {0};
+	struct utmp utmp = { 0 };
 	struct utsname uname_buf;
 	struct timeval tv;
 
@@ -194,7 +194,7 @@ 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_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);