diff options
Diffstat (limited to 'src/rccdb4.c')
-rw-r--r-- | src/rccdb4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rccdb4.c b/src/rccdb4.c index 795b721..5e0894a 100644 --- a/src/rccdb4.c +++ b/src/rccdb4.c @@ -84,7 +84,7 @@ void rccDb4FreeContext(db4_context ctx) { } } -int rccDb4SetKey(db4_context ctx, const char *orig, size_t olen, const rcc_string string, size_t slen) { +int rccDb4SetKey(db4_context ctx, const char *orig, size_t olen, const rcc_string string) { int err; DBT key, data; @@ -94,9 +94,9 @@ int rccDb4SetKey(db4_context ctx, const char *orig, size_t olen, const rcc_strin memset(&data, 0, sizeof(data)); key.data = (char*)orig; - key.size = STRNLEN(orig, olen); + key.size = STRNLEN(orig, olen); /* No ending zero */ data.data = (char*)string; - data.size = STRNLEN(string, slen); + data.size = strlen(string)+1; if (key.size < MIN_CHARS) return -1; @@ -114,7 +114,7 @@ rcc_string rccDb4GetKey(db4_context ctx, const char *orig, size_t olen) { memset(&data, 0, sizeof(data)); key.data = (char*)orig; - key.size = STRNLEN(orig, olen); + key.size = STRNLEN(orig, olen); /* No ending zero */ data.flags = DB_DBT_REALLOC; |