summaryrefslogtreecommitdiff
path: root/src/supervision/s6-supervise.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 23:16:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 23:16:36 +0000
commitbf6d072124a960d3b84ae39cd15c5aeca2e41c88 (patch)
treec082150f61e67d929b1baca2f5c6104fe959ccac /src/supervision/s6-supervise.c
parent81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff)
downloads6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz
Types fix, first pass
Diffstat (limited to 'src/supervision/s6-supervise.c')
-rw-r--r--src/supervision/s6-supervise.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c
index 2e8fa38..8006e9f 100644
--- a/src/supervision/s6-supervise.c
+++ b/src/supervision/s6-supervise.c
@@ -72,7 +72,7 @@ static inline void announce (void)
static int read_uint (char const *file, unsigned int *fd)
{
char buf[UINT_FMT + 1] ;
- register int r = openreadnclose_nb(file, buf, UINT_FMT) ;
+ register ssize_t r = openreadnclose_nb(file, buf, UINT_FMT) ;
if (r < 0)
{
if (errno != ENOENT) strerr_warnwu2sys("open ", file) ;
@@ -476,7 +476,7 @@ static action_t_ref const actions[5][25] =
static inline void handle_notifyfd (void)
{
char buf[4096] ;
- register int r = 1 ;
+ register ssize_t r = 1 ;
while (r > 0)
{
r = sanitize_read(fd_read(notifyfd, buf, 4096)) ;
@@ -538,12 +538,12 @@ static inline void handle_control (int fd)
for (;;)
{
char c ;
- register int r = sanitize_read(fd_read(fd, &c, 1)) ;
+ register ssize_t r = sanitize_read(fd_read(fd, &c, 1)) ;
if (r < 0) strerr_diefu1sys(111, "read " S6_SUPERVISE_CTLDIR "/control") ;
else if (!r) break ;
else
{
- register unsigned int pos = byte_chr("abqhkti12fFpcyoduxOX", 20, c) ;
+ register size_t pos = byte_chr("abqhkti12fFpcyoduxOX", 20, c) ;
if (pos < 20) (*actions[state][V_a + pos])() ;
}
}
@@ -556,8 +556,8 @@ int main (int argc, char const *const *argv)
if (argc < 2) strerr_dieusage(100, USAGE) ;
if (chdir(argv[1]) < 0) strerr_diefu2sys(111, "chdir to ", argv[1]) ;
{
- register unsigned int proglen = str_len(PROG) ;
- register unsigned int namelen = str_len(argv[1]) ;
+ size_t proglen = str_len(PROG) ;
+ size_t namelen = str_len(argv[1]) ;
char progname[proglen + namelen + 2] ;
byte_copy(progname, proglen, PROG) ;
progname[proglen] = ' ' ;