summaryrefslogtreecommitdiff
path: root/src/libstddjb/cdb_mapfile.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-06-30 11:25:07 +0000
committerLaurent Bercot <ska@appnovation.com>2021-06-30 11:25:07 +0000
commit6c7a5b92bdfe68e847d371cc41f6655df3ef1ba5 (patch)
tree94515f79ddde39bfcb5514a263a320bf374fa6d2 /src/libstddjb/cdb_mapfile.c
parente0bc74ff013a3628b17911be624d17067259c07b (diff)
downloadskalibs-6c7a5b92bdfe68e847d371cc41f6655df3ef1ba5.tar.xz
bugfix: offset in cdb mmap
An offset of -1 worked because most OSes treat it as 0, but DS9k would fail on it. Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/cdb_mapfile.c')
-rw-r--r--src/libstddjb/cdb_mapfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstddjb/cdb_mapfile.c b/src/libstddjb/cdb_mapfile.c
index f2c56bb..b31f1e6 100644
--- a/src/libstddjb/cdb_mapfile.c
+++ b/src/libstddjb/cdb_mapfile.c
@@ -5,9 +5,9 @@
int cdb_mapfile (struct cdb *c, char const *file)
{
- int fd = open_readb(file) ;
+ int fd = openc_read(file) ;
if (fd < 0) return 0 ;
- if (!cdb_init_map(c, fd, 1))
+ if (cdb_init(c, fd) == -1)
{
fd_close(fd) ;
return 0 ;