summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_livedir_prefix.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-06-08 10:04:08 +0000
committerLaurent Bercot <ska@appnovation.com>2022-06-08 10:04:08 +0000
commitfcab3d33c72bc360ec727b7a50826ec1dd48336c (patch)
tree1893e125c24987660e69f4de24bc6d4d34b23ef7 /src/libs6rc/s6rc_livedir_prefix.c
parent12a8fa2ce36654fb77dc4d36a4a89f57dc20e562 (diff)
downloads6-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_livedir_prefix.c')
-rw-r--r--src/libs6rc/s6rc_livedir_prefix.c2
1 files changed, 1 insertions, 1 deletions
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 ;
}