summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
Diffstat (limited to 'runit')
-rw-r--r--runit/runit_lib.c2
-rw-r--r--runit/runsv.c4
-rw-r--r--runit/sv.c4
-rw-r--r--runit/svlogd.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/runit/runit_lib.c b/runit/runit_lib.c
index 5ebbc58..8612a1b 100644
--- a/runit/runit_lib.c
+++ b/runit/runit_lib.c
@@ -337,7 +337,7 @@ unsigned fmt_ulong(char *s,unsigned long u)
while (q > 9) { ++len; q /= 10; }
if (s) {
s += len;
- do { *--s = '0' + (u % 10); u /= 10; } while(u); /* handles u == 0 */
+ do { *--s = '0' + (u % 10); u /= 10; } while (u); /* handles u == 0 */
}
return len;
}
diff --git a/runit/runsv.c b/runit/runsv.c
index e1b5459..9e117fe 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -155,7 +155,7 @@ static void update_status(struct svdir *s)
if (s->ctrl & C_PAUSE) p = add_str(p, ", paused");
if (s->ctrl & C_TERM) p = add_str(p, ", got TERM");
if (s->state != S_DOWN)
- switch(s->want) {
+ switch (s->want) {
case W_DOWN:
p = add_str(p, ", want down");
break;
@@ -329,7 +329,7 @@ static void startservice(struct svdir *s)
static int ctrl(struct svdir *s, char c)
{
- switch(c) {
+ switch (c) {
case 'd': /* down */
s->want = W_DOWN;
update_status(s);
diff --git a/runit/sv.c b/runit/sv.c
index 819f314..9471d09 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -75,7 +75,7 @@ static int svstatus_get(void)
}
r = read(fd, svstatus, 20);
close(fd);
- switch(r) {
+ switch (r) {
case 20: break;
case -1: warn_cannot("read supervise/status"); return -1;
default: warnx_cannot("read supervise/status: bad format"); return -1;
@@ -124,7 +124,7 @@ static unsigned svstatus_print(char *m)
static int status(char *unused)
{
r = svstatus_get();
- switch(r) { case -1: case 0: return 0; }
+ switch (r) { case -1: case 0: return 0; }
r = svstatus_print(*service);
if (chdir("log") == -1) {
if (errno != ENOENT) {
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 7024c3d..c91f85f 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -262,7 +262,7 @@ static unsigned rotate(struct logdir *ld)
return 0;
}
if (ld->ppid)
- while(!processorstop(ld))
+ while (!processorstop(ld))
/* wait */;
while (fchdir(ld->fddir) == -1)