diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-09-08 08:03:58 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-09-08 08:03:58 +0000 |
commit | a646c96d5f7ec4b4e0bb538a41fc202c2cdb3309 (patch) | |
tree | a5260aa8fe9c4f1ee2772d318024b5cb208f9bf2 /src/libstddjb/slurpn.c | |
parent | 1f2d5f95684e93f8523e369ef1fed7a75c444082 (diff) | |
download | skalibs-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.c | 2 |
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) { |