summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_db_read.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-08-22 10:27:47 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-08-22 10:27:47 +0000
commit83cd31ed0679300cb7ac9335785f1b3ec9633712 (patch)
treecd9a29ca6e410f19c98d97999b68ef4d362160af /src/libs6rc/s6rc_db_read.c
parent5589e71de950b2baca33c38c6632e374b2211dfb (diff)
downloads6-rc-83cd31ed0679300cb7ac9335785f1b3ec9633712.tar.xz
Prepare for 0.2.1.2
Diffstat (limited to 'src/libs6rc/s6rc_db_read.c')
-rw-r--r--src/libs6rc/s6rc_db_read.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libs6rc/s6rc_db_read.c b/src/libs6rc/s6rc_db_read.c
index 64a0eea..b3f9aed 100644
--- a/src/libs6rc/s6rc_db_read.c
+++ b/src/libs6rc/s6rc_db_read.c
@@ -2,7 +2,6 @@
#include <string.h>
#include <stdint.h>
-#include <errno.h>
#include <skalibs/bytestr.h>
#include <skalibs/buffer.h>
#include <skalibs/env.h>
@@ -158,15 +157,13 @@ static inline int s6rc_db_read_buffer (buffer *b, s6rc_db_t *db)
int s6rc_db_read (int fdcompiled, s6rc_db_t *db)
{
- int r, e ;
+ int r ;
buffer b ;
char buf[BUFFER_INSIZE] ;
int fd = open_readatb(fdcompiled, "db") ;
if (fd < 0) return -1 ;
buffer_init(&b, &buffer_read, fd, buf, BUFFER_INSIZE) ;
r = s6rc_db_read_buffer(&b, db) ;
- e = errno ;
fd_close(fd) ;
- errno = e ;
return r ;
}