diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-26 10:42:51 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-26 10:42:51 +0000 |
commit | bf0a201008671f81c107de72c026b1b84967561d (patch) | |
tree | af74820b70fa27929fe218c95822c20651b60637 /runit | |
parent | 5dd7ef0f37373e397a7160cb431a32ae57f9f7d9 (diff) | |
download | busybox-w32-bf0a201008671f81c107de72c026b1b84967561d.tar.gz busybox-w32-bf0a201008671f81c107de72c026b1b84967561d.tar.bz2 busybox-w32-bf0a201008671f81c107de72c026b1b84967561d.zip |
style fixes
last xcalloc replaced by xzalloc
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runit_lib.c | 2 | ||||
-rw-r--r-- | runit/runsv.c | 4 | ||||
-rw-r--r-- | runit/sv.c | 4 | ||||
-rw-r--r-- | runit/svlogd.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/runit/runit_lib.c b/runit/runit_lib.c index 5ebbc5840..8612a1b94 100644 --- a/runit/runit_lib.c +++ b/runit/runit_lib.c | |||
@@ -337,7 +337,7 @@ unsigned fmt_ulong(char *s,unsigned long u) | |||
337 | while (q > 9) { ++len; q /= 10; } | 337 | while (q > 9) { ++len; q /= 10; } |
338 | if (s) { | 338 | if (s) { |
339 | s += len; | 339 | s += len; |
340 | do { *--s = '0' + (u % 10); u /= 10; } while(u); /* handles u == 0 */ | 340 | do { *--s = '0' + (u % 10); u /= 10; } while (u); /* handles u == 0 */ |
341 | } | 341 | } |
342 | return len; | 342 | return len; |
343 | } | 343 | } |
diff --git a/runit/runsv.c b/runit/runsv.c index e1b5459fb..9e117fe0a 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -155,7 +155,7 @@ static void update_status(struct svdir *s) | |||
155 | if (s->ctrl & C_PAUSE) p = add_str(p, ", paused"); | 155 | if (s->ctrl & C_PAUSE) p = add_str(p, ", paused"); |
156 | if (s->ctrl & C_TERM) p = add_str(p, ", got TERM"); | 156 | if (s->ctrl & C_TERM) p = add_str(p, ", got TERM"); |
157 | if (s->state != S_DOWN) | 157 | if (s->state != S_DOWN) |
158 | switch(s->want) { | 158 | switch (s->want) { |
159 | case W_DOWN: | 159 | case W_DOWN: |
160 | p = add_str(p, ", want down"); | 160 | p = add_str(p, ", want down"); |
161 | break; | 161 | break; |
@@ -329,7 +329,7 @@ static void startservice(struct svdir *s) | |||
329 | 329 | ||
330 | static int ctrl(struct svdir *s, char c) | 330 | static int ctrl(struct svdir *s, char c) |
331 | { | 331 | { |
332 | switch(c) { | 332 | switch (c) { |
333 | case 'd': /* down */ | 333 | case 'd': /* down */ |
334 | s->want = W_DOWN; | 334 | s->want = W_DOWN; |
335 | update_status(s); | 335 | update_status(s); |
diff --git a/runit/sv.c b/runit/sv.c index 819f31419..9471d09a8 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -75,7 +75,7 @@ static int svstatus_get(void) | |||
75 | } | 75 | } |
76 | r = read(fd, svstatus, 20); | 76 | r = read(fd, svstatus, 20); |
77 | close(fd); | 77 | close(fd); |
78 | switch(r) { | 78 | switch (r) { |
79 | case 20: break; | 79 | case 20: break; |
80 | case -1: warn_cannot("read supervise/status"); return -1; | 80 | case -1: warn_cannot("read supervise/status"); return -1; |
81 | default: warnx_cannot("read supervise/status: bad format"); return -1; | 81 | default: warnx_cannot("read supervise/status: bad format"); return -1; |
@@ -124,7 +124,7 @@ static unsigned svstatus_print(char *m) | |||
124 | static int status(char *unused) | 124 | static int status(char *unused) |
125 | { | 125 | { |
126 | r = svstatus_get(); | 126 | r = svstatus_get(); |
127 | switch(r) { case -1: case 0: return 0; } | 127 | switch (r) { case -1: case 0: return 0; } |
128 | r = svstatus_print(*service); | 128 | r = svstatus_print(*service); |
129 | if (chdir("log") == -1) { | 129 | if (chdir("log") == -1) { |
130 | if (errno != ENOENT) { | 130 | if (errno != ENOENT) { |
diff --git a/runit/svlogd.c b/runit/svlogd.c index 7024c3db4..c91f85fe1 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -262,7 +262,7 @@ static unsigned rotate(struct logdir *ld) | |||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | if (ld->ppid) | 264 | if (ld->ppid) |
265 | while(!processorstop(ld)) | 265 | while (!processorstop(ld)) |
266 | /* wait */; | 266 | /* wait */; |
267 | 267 | ||
268 | while (fchdir(ld->fddir) == -1) | 268 | while (fchdir(ld->fddir) == -1) |