summaryrefslogtreecommitdiff
path: root/src/conn-tools/s6-accessrules-cdb-from-fs.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/conn-tools/s6-accessrules-cdb-from-fs.c
parent81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff)
downloads6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz
Types fix, first pass
Diffstat (limited to 'src/conn-tools/s6-accessrules-cdb-from-fs.c')
-rw-r--r--src/conn-tools/s6-accessrules-cdb-from-fs.c16
1 files changed, 9 insertions, 7 deletions
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 <sys/types.h>
+#include <stdint.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h> /* 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 ;