diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 08:45:46 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 08:45:46 +0000 |
commit | f15620c372b8813a87d07eee169cf2096c99c173 (patch) | |
tree | f1c59f41d4a9c9f5f45595695327b0e4a74b1408 /src/rccdb4.c | |
parent | 7233ff9095194b38586ce438379f08691a0fecdd (diff) | |
download | librcc-f15620c372b8813a87d07eee169cf2096c99c173.tar.gz librcc-f15620c372b8813a87d07eee169cf2096c99c173.tar.bz2 librcc-f15620c372b8813a87d07eee169cf2096c99c173.tar.xz librcc-f15620c372b8813a87d07eee169cf2096c99c173.zip |
IConv and DB4
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; |