From bf6d072124a960d3b84ae39cd15c5aeca2e41c88 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 12 Jan 2017 23:16:36 +0000 Subject: Types fix, first pass --- src/conn-tools/s6-accessrules-cdb-from-fs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/conn-tools/s6-accessrules-cdb-from-fs.c') diff --git a/src/conn-tools/s6-accessrules-cdb-from-fs.c b/src/conn-tools/s6-accessrules-cdb-from-fs.c index c1aa992..c5b007c 100644 --- a/src/conn-tools/s6-accessrules-cdb-from-fs.c +++ b/src/conn-tools/s6-accessrules-cdb-from-fs.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include +#include #include #include #include /* for rename() */ @@ -31,9 +33,9 @@ static void dienomem (void) strerr_diefu1sys(111, "stralloc_catb") ; } -static void doit (struct cdb_make *c, stralloc *sa, unsigned int start) +static void doit (struct cdb_make *c, stralloc *sa, size_t start) { - unsigned int tmpbase = tmp.len ; + size_t tmpbase = tmp.len ; unsigned int k = sa->len ; if (!stralloc_readyplus(sa, 10)) dienomem() ; stralloc_catb(sa, "/allow", 7) ; @@ -62,9 +64,9 @@ static void doit (struct cdb_make *c, stralloc *sa, unsigned int start) } else { - uint16 envlen = 0 ; - uint16 execlen = 0 ; - register int r ; + uint16_t envlen = 0 ; + uint16_t execlen = 0 ; + register ssize_t r ; tmp.s[tmpbase] = 'A' ; sa->len = k+1 ; stralloc_catb(sa, "env", 4) ; @@ -106,7 +108,7 @@ int main (int argc, char const *const *argv) stralloc sa = STRALLOC_ZERO ; struct cdb_make c = CDB_MAKE_ZERO ; DIR *dir ; - unsigned int start ; + size_t start ; int fd ; PROG = "s6-accessrules-cdb-from-fs" ; if (argc < 3) strerr_dieusage(100, USAGE) ; @@ -138,7 +140,7 @@ int main (int argc, char const *const *argv) { DIR *subdir ; direntry *d ; - unsigned int base ; + size_t base ; errno = 0 ; d = readdir(dir) ; if (!d) break ; -- cgit 1.4.1