aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos_db.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-01 23:55:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-01 23:55:58 +0000
commitba6b743ba088a1ee889f6315c05711d3e4505d61 (patch)
tree0a1b5c0d971b40567c23c9ae439439bf869f9a10 /apropos_db.c
parent80244c48e0ba678ad998cda0739a4d5dc399ac10 (diff)
downloadmandoc-ba6b743ba088a1ee889f6315c05711d3e4505d61.tar.gz
mandoc-ba6b743ba088a1ee889f6315c05711d3e4505d61.tar.zst
mandoc-ba6b743ba088a1ee889f6315c05711d3e4505d61.zip
Use OpenBSD's endian functions. Make btree type also be endian-neutral.
Diffstat (limited to 'apropos_db.c')
-rw-r--r--apropos_db.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apropos_db.c b/apropos_db.c
index 4d9ae874..4a305e59 100644
--- a/apropos_db.c
+++ b/apropos_db.c
@@ -1,4 +1,4 @@
-/* $Id: apropos_db.c,v 1.17 2011/12/01 23:46:26 kristaps Exp $ */
+/* $Id: apropos_db.c,v 1.18 2011/12/01 23:55:58 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -24,8 +24,6 @@
#include <string.h>
#include <unistd.h>
-#include <arpa/inet.h>
-
#ifdef __linux__
# include <db_185.h>
#else
@@ -177,8 +175,8 @@ btree_read(const DBT *k, const DBT *v,
vp = v->data;
norm_string((const char *)k->data, mc, buf);
- dbv->rec = ntohl(vp->rec);
- dbv->mask = vp->mask;
+ dbv->rec = betoh32(vp->rec);
+ dbv->mask = betoh64(vp->mask);
return(1);
}