diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-08 22:37:23 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-08 22:37:23 +0000 |
commit | c0bfd8814f6cd8e45a230deca0f28954ed38480e (patch) | |
tree | 3fe2e7692806402346cae9509b22d790e5a6b39d /src/libs6rc/s6rc_sanitize_dir.c | |
parent | da010cd4a3a4da1b03940b76b138e75cc36106cf (diff) | |
download | s6-rc-c0bfd8814f6cd8e45a230deca0f28954ed38480e.tar.xz |
Types fix: first pass
Diffstat (limited to 'src/libs6rc/s6rc_sanitize_dir.c')
-rw-r--r-- | src/libs6rc/s6rc_sanitize_dir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs6rc/s6rc_sanitize_dir.c b/src/libs6rc/s6rc_sanitize_dir.c index 69c4d13..fa7079d 100644 --- a/src/libs6rc/s6rc_sanitize_dir.c +++ b/src/libs6rc/s6rc_sanitize_dir.c @@ -1,16 +1,17 @@ /* ISC license. */ +#include <sys/types.h> #include <skalibs/bytestr.h> #include <skalibs/stralloc.h> #include <skalibs/djbunix.h> #include <s6-rc/s6rc-utils.h> -int s6rc_sanitize_dir (stralloc *sa, char const *fn, unsigned int *dirlen) +int s6rc_sanitize_dir (stralloc *sa, char const *fn, size_t *dirlen) { + size_t base = sa->len ; + size_t fnlen = str_len(fn) ; + size_t ddirlen ; int wasnull = !sa->s ; - unsigned int base = sa->len ; - unsigned int fnlen = str_len(fn) ; - unsigned int ddirlen ; if (!sadirname(sa, fn, fnlen)) return 0 ; if (sa->len != base + 1 || sa->s[base] != '/') if (!stralloc_catb(sa, "/", 1)) goto err ; |