From fcab3d33c72bc360ec727b7a50826ec1dd48336c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 8 Jun 2022 10:04:08 +0000 Subject: Prepare for 0.5.3.2; adapt to skalibs-2.12.0.0 Signed-off-by: Laurent Bercot --- src/libs6rc/s6rc_livedir_prefix.c | 2 +- src/libs6rc/s6rc_read_uint.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs6rc') diff --git a/src/libs6rc/s6rc_livedir_prefix.c b/src/libs6rc/s6rc_livedir_prefix.c index 09fe263..e28c078 100644 --- a/src/libs6rc/s6rc_livedir_prefix.c +++ b/src/libs6rc/s6rc_livedir_prefix.c @@ -13,7 +13,7 @@ ssize_t s6rc_livedir_prefix (char const *live, char *s, size_t n) memcpy(sfn, live, llen) ; memcpy(sfn + llen, "/prefix", 8) ; r = openreadnclose(sfn, s, n) ; - if (r < 0) return errno == ENOENT ? 0 : r ; + if (r == -1) return errno == ENOENT ? 0 : r ; if (memchr(s, '/', r) || memchr(s, '\n', r)) return (errno = EINVAL, -1) ; return r ; } 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 ; -- cgit v1.2.3