summaryrefslogtreecommitdiff
path: root/src/libstddjb/slurpn.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-08 08:03:58 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-08 08:03:58 +0000
commita646c96d5f7ec4b4e0bb538a41fc202c2cdb3309 (patch)
treea5260aa8fe9c4f1ee2772d318024b5cb208f9bf2 /src/libstddjb/slurpn.c
parent1f2d5f95684e93f8523e369ef1fed7a75c444082 (diff)
downloadskalibs-a646c96d5f7ec4b4e0bb538a41fc202c2cdb3309.tar.xz
Make child_spawn_workaround public
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/slurpn.c')
-rw-r--r--src/libstddjb/slurpn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/slurpn.c b/src/libstddjb/slurpn.c
index 317e300..d6a20da 100644
--- a/src/libstddjb/slurpn.c
+++ b/src/libstddjb/slurpn.c
@@ -16,7 +16,7 @@ int slurpn (int fd, stralloc *sa, size_t max)
ssize_t r ;
size_t n = max && sa->len + N > max ? max - sa->len : N ;
if (!n) return (errno = ENOBUFS, 0) ;
- if (!stralloc_readyplus(sa, n)) break ;
+ if (!stralloc_readyplus(sa, n)) return 0 ;
r = fd_read(fd, sa->s + sa->len, n) ;
switch (r)
{