summaryrefslogtreecommitdiff
path: root/src/libstddjb/openslurpclose.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-05-18 02:19:59 +0000
committerLaurent Bercot <ska@appnovation.com>2023-05-18 02:19:59 +0000
commit2af587d68d11b1826c356364b4e9679199eee2ed (patch)
tree4cffead67aea555d1306495e60fc30ce1185db7b /src/libstddjb/openslurpclose.c
parent8ef88c7d9a7108409c1e58c21b3d0590c859384f (diff)
downloadskalibs-2af587d68d11b1826c356364b4e9679199eee2ed.tar.xz
Add slurpn, refactor slurp, fix avltree/cdbmake bugs, add strerr_warnf
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/openslurpclose.c')
-rw-r--r--src/libstddjb/openslurpclose.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libstddjb/openslurpclose.c b/src/libstddjb/openslurpclose.c
index 8485413..e6b0570 100644
--- a/src/libstddjb/openslurpclose.c
+++ b/src/libstddjb/openslurpclose.c
@@ -1,14 +1,8 @@
/* ISC license. */
-#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
int openslurpclose (stralloc *sa, char const *fn)
{
- int r ;
- int fd = openbc_read(fn) ;
- if (fd == -1) return 0 ;
- r = slurp(sa, fd) ;
- fd_close(fd) ;
- return r ;
+ return openslurpnclose(fn, sa, 0) ;
}