style fixes
last xcalloc replaced by xzalloc
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user