summaryrefslogtreecommitdiff
path: root/src/libstddjb/iobufferk_init.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-04 14:40:52 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-04 14:40:52 +0000
commit2ddd93b4423b94578868e2701c265f8da4350965 (patch)
tree9994c48d0a67b169623d69ed16edc44910e21429 /src/libstddjb/iobufferk_init.c
parent38da4384d3b4630787430b9b38bd4726e00cc7d9 (diff)
downloadskalibs-2ddd93b4423b94578868e2701c265f8da4350965.tar.xz
Fix iobufferk_init on recent Linux; remove last superfluous coe
Diffstat (limited to 'src/libstddjb/iobufferk_init.c')
-rw-r--r--src/libstddjb/iobufferk_init.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstddjb/iobufferk_init.c b/src/libstddjb/iobufferk_init.c
index 93cd615..12a2822 100644
--- a/src/libstddjb/iobufferk_init.c
+++ b/src/libstddjb/iobufferk_init.c
@@ -6,18 +6,14 @@
#include <sys/stat.h>
#include <fcntl.h>
+
#include <skalibs/djbunix.h>
#include <skalibs/iobuffer.h>
static int iobufferk_init_0 (iobufferk *k)
{
- int fd = open_write("/dev/null") ;
+ int fd = openc_write("/dev/null") ;
if (fd < 0) return 0 ;
- if (coe(fd) < 0)
- {
- fd_close(fd) ;
- return 0 ;
- }
k->p[0] = -1 ;
k->p[1] = fd ;
return 1 ;
@@ -31,7 +27,7 @@ static int iobufferk_nofd (iobufferk *k)
static int iobufferk_init_3 (iobufferk *k)
{
- return (pipenbcoe(k->p) >= 0) ;
+ return (pipecoe(k->p) >= 0) ;
}
static iobufferk_output_func_t_ref iobufferk_init_f[4] =