diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-12 23:16:36 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-12 23:16:36 +0000 |
commit | bf6d072124a960d3b84ae39cd15c5aeca2e41c88 (patch) | |
tree | c082150f61e67d929b1baca2f5c6104fe959ccac /src/supervision/s6-svscan.c | |
parent | 81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff) | |
download | s6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz |
Types fix, first pass
Diffstat (limited to 'src/supervision/s6-svscan.c')
-rw-r--r-- | src/supervision/s6-svscan.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/supervision/s6-svscan.c b/src/supervision/s6-svscan.c index 28ce830..cf8714c 100644 --- a/src/supervision/s6-svscan.c +++ b/src/supervision/s6-svscan.c @@ -36,7 +36,7 @@ struct svinfo_s dev_t dev ; ino_t ino ; tain_t restartafter[2] ; - int pid[2] ; + pid_t pid[2] ; int p[2] ; unsigned int flagactive : 1 ; unsigned int flaglog : 1 ; @@ -151,7 +151,7 @@ static void handle_diverted_signals (void) default : { char const *name = sig_name(sig) ; - unsigned int len = str_len(name) ; + size_t len = str_len(name) ; char fn[SIGNAL_PROG_LEN + len + 1] ; char const *const newargv[2] = { fn, 0 } ; byte_copy(fn, SIGNAL_PROG_LEN, SIGNAL_PROG) ; @@ -168,8 +168,8 @@ static void handle_control (int fd) for (;;) { char c ; - int r = sanitize_read(fd_read(fd, &c, 1)) ; - if (r == -1) panic("read control pipe") ; + ssize_t r = sanitize_read(fd_read(fd, &c, 1)) ; + if (r < 0) panic("read control pipe") ; else if (!r) break ; else switch (c) { @@ -282,7 +282,7 @@ static void reap (void) static void trystart (unsigned int i, char const *name, int islog) { - int pid = fork() ; + pid_t pid = fork() ; switch (pid) { case -1 : @@ -314,7 +314,7 @@ static void retrydirlater (void) static void check (char const *name) { struct stat st ; - unsigned int namelen ; + size_t namelen ; unsigned int i = 0 ; if (name[0] == '.') return ; if (stat(name, &st) == -1) |