From 49d8fa1058aaf23c29e074b2314492ae40d2f557 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 21 Feb 2017 12:05:07 +0000 Subject: Types change: big pass on libstddjb and libunixonacid libdatastruct still missing, library still not functional --- src/libstddjb/cdb_findnext.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/libstddjb/cdb_findnext.c') diff --git a/src/libstddjb/cdb_findnext.c b/src/libstddjb/cdb_findnext.c index 2559bc2..536013b 100644 --- a/src/libstddjb/cdb_findnext.c +++ b/src/libstddjb/cdb_findnext.c @@ -1,18 +1,19 @@ /* ISC license. */ -#include +#include +#include #include #include -static int match (struct cdb *c, char const *key, unsigned int len, uint32 pos) +static int match (struct cdb *c, char const *key, unsigned int len, uint32_t pos) { char buf[1024] ; while (len > 0) { - register unsigned int n = 1024 ; + unsigned int n = 1024 ; if (n > len) n = len ; if (cdb_read(c, buf, n, pos) < 0) return -1 ; - if (byte_diff(buf, n, key)) return 0 ; + if (memcmp(buf, key, n)) return 0 ; pos += n ; key += n ; len -= n ; } return 1 ; @@ -21,8 +22,8 @@ static int match (struct cdb *c, char const *key, unsigned int len, uint32 pos) int cdb_findnext (struct cdb *c, char const *key, unsigned int len) { char buf[8] ; - uint32 pos ; - uint32 u ; + uint32_t pos ; + uint32_t u ; if (!c->loop) { -- cgit v1.3.1