diff options
Diffstat (limited to 'src/conn-tools/s6-ipcserver.c')
-rw-r--r-- | src/conn-tools/s6-ipcserver.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/conn-tools/s6-ipcserver.c b/src/conn-tools/s6-ipcserver.c index 7b7023f..9e85699 100644 --- a/src/conn-tools/s6-ipcserver.c +++ b/src/conn-tools/s6-ipcserver.c @@ -2,8 +2,7 @@ #include <sys/types.h> #include <limits.h> -#include <skalibs/uint.h> -#include <skalibs/gidstuff.h> +#include <skalibs/types.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> @@ -21,7 +20,7 @@ int main (int argc, char const *const *argv, char const *const *envp) int flagreuse = 1 ; unsigned int uid = 0, gid = 0 ; gid_t gids[NGROUPS_MAX] ; - unsigned int gidn = (unsigned int)-1 ; + size_t gidn = (size_t)-1 ; unsigned int maxconn = 0 ; unsigned int localmaxconn = 0 ; unsigned int backlog = (unsigned int)-1 ; @@ -30,7 +29,7 @@ int main (int argc, char const *const *argv, char const *const *envp) subgetopt_t l = SUBGETOPT_ZERO ; for (;;) { - register int opt = subgetopt_r(argc, argv, "qQvDd1UPpc:C:b:u:g:G:", &l) ; + int opt = subgetopt_r(argc, argv, "qQvDd1UPpc:C:b:u:g:G:", &l) ; if (opt == -1) break ; switch (opt) { @@ -48,7 +47,7 @@ int main (int argc, char const *const *argv, char const *const *envp) case 'g' : if (!uint0_scan(l.arg, &gid)) dieusage() ; break ; case 'G' : if (!gid_scanlist(gids, NGROUPS_MAX, l.arg, &gidn) && *l.arg) dieusage() ; break ; case '1' : flag1 = 1 ; break ; - case 'U' : flagU = 1 ; uid = 0 ; gid = 0 ; gidn = (unsigned int)-1 ; break ; + case 'U' : flagU = 1 ; uid = 0 ; gid = 0 ; gidn = (size_t)-1 ; break ; default : dieusage() ; } } @@ -73,7 +72,7 @@ int main (int argc, char const *const *argv, char const *const *envp) } newargv[m++] = "--" ; newargv[m++] = *argv++ ; - if (flagU || uid || gid || gidn != (unsigned int)-1) + if (flagU || uid || gid || gidn != (size_t)-1) { newargv[m++] = S6_BINPREFIX "s6-applyuidgid" ; if (flagU) newargv[m++] = "-Uz" ; @@ -91,7 +90,7 @@ int main (int argc, char const *const *argv, char const *const *envp) pos += uint_fmt(fmt + pos, gid) ; fmt[pos++] = 0 ; } - if (gidn != (unsigned int)-1) + if (gidn != (size_t)-1) { newargv[m++] = "-G" ; newargv[m++] = fmt + pos ; |