diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2022-06-08 10:04:08 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2022-06-08 10:04:08 +0000 |
commit | fcab3d33c72bc360ec727b7a50826ec1dd48336c (patch) | |
tree | 1893e125c24987660e69f4de24bc6d4d34b23ef7 /src/libs6rc/s6rc_read_uint.c | |
parent | 12a8fa2ce36654fb77dc4d36a4a89f57dc20e562 (diff) | |
download | s6-rc-fcab3d33c72bc360ec727b7a50826ec1dd48336c.tar.xz |
Prepare for 0.5.3.2; adapt to skalibs-2.12.0.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6rc/s6rc_read_uint.c')
-rw-r--r-- | src/libs6rc/s6rc_read_uint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_read_uint.c b/src/libs6rc/s6rc_read_uint.c index 1f148ac..c694f0d 100644 --- a/src/libs6rc/s6rc_read_uint.c +++ b/src/libs6rc/s6rc_read_uint.c @@ -11,7 +11,7 @@ int s6rc_read_uint (char const *file, unsigned int *u) { char buf[UINT_FMT + 1] ; ssize_t r = openreadnclose(file, buf, UINT_FMT) ; - if (r < 0) return (errno == ENOENT) ? 0 : -1 ; + if (r == -1) return (errno == ENOENT) ? 0 : -1 ; buf[byte_chr(buf, r, '\n')] = 0 ; if (!uint0_scan(buf, u)) return (errno = EINVAL, -1) ; return 1 ; |