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_read_uint.c | |
parent | da010cd4a3a4da1b03940b76b138e75cc36106cf (diff) | |
download | s6-rc-c0bfd8814f6cd8e45a230deca0f28954ed38480e.tar.xz |
Types fix: first pass
Diffstat (limited to 'src/libs6rc/s6rc_read_uint.c')
-rw-r--r-- | src/libs6rc/s6rc_read_uint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_read_uint.c b/src/libs6rc/s6rc_read_uint.c index 6953190..87022c6 100644 --- a/src/libs6rc/s6rc_read_uint.c +++ b/src/libs6rc/s6rc_read_uint.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <sys/types.h> #include <errno.h> #include <skalibs/uint.h> #include <skalibs/bytestr.h> @@ -8,7 +9,7 @@ int s6rc_read_uint (char const *file, unsigned int *u) { char buf[UINT_FMT + 1] ; - register int r = openreadnclose(file, buf, UINT_FMT) ; + register ssize_t r = openreadnclose(file, buf, UINT_FMT) ; if (r < 0) return (errno == ENOENT) ? 0 : -1 ; buf[byte_chr(buf, r, '\n')] = 0 ; if (!uint0_scan(buf, u)) return (errno = EINVAL, -1) ; |