aboutsummaryrefslogtreecommitdiff
path: root/db/hash
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-23 14:02:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-23 14:02:16 +0000
commit24fd4cc4512102239f408ad965c7d65229be90d3 (patch)
treecccbe271bb9e2373a4beae0b0ae58773619b7856 /db/hash
parent1cd9c90dc94714b358b7f968122f00088c852763 (diff)
downloadglibc-24fd4cc4512102239f408ad965c7d65229be90d3.tar
glibc-24fd4cc4512102239f408ad965c7d65229be90d3.tar.gz
glibc-24fd4cc4512102239f408ad965c7d65229be90d3.tar.bz2
glibc-24fd4cc4512102239f408ad965c7d65229be90d3.zip
Update.
1998-09-23 13:52 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (all-subdirs): Add db. * Versions.def: Add definition for libdb1. * shlib-versions: Add definitions for libdb1. * db/Makefile (extra-libs): Replace by libdb1. (libdb-routines): Rename to libdb1-routines. (headers): Rename to db1-headers. (distribute): Add $(db1-headers). (install-others): Define to install symlink libdb.so.NN and the $(db1-headers). (CPPFLAGS): Add -USE_LIBDB1 Remove rules to build makedb. * db/Versions: Rename libdb to libdb1. * include/db.h: If USE_LIBDB1 is defined include db/db.h. * scripts/versions.awk: Recognize digits in library names. * db/btree/bt_open.c: Fix compiler warnings. * db/btree/bt_put.c: Likewise. * db/btree/bt_split.c: Likewise. * db/hash/hash.c: Likewise. * db/hash/hash_bigkey.c: Likewise. * db/recno/rec_close.c: Likewise.
Diffstat (limited to 'db/hash')
-rw-r--r--db/hash/hash.c2
-rw-r--r--db/hash/hash_bigkey.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/db/hash/hash.c b/db/hash/hash.c
index 4ccb992bb7..99592eac51 100644
--- a/db/hash/hash.c
+++ b/db/hash/hash.c
@@ -873,7 +873,7 @@ hash_realloc(p_ptr, oldsize, newsize)
{
register void *p;
- if (p = malloc(newsize)) {
+ if ((p = malloc(newsize))) {
memmove(p, *p_ptr, oldsize);
memset((char *)p + oldsize, 0, newsize - oldsize);
free(*p_ptr);
diff --git a/db/hash/hash_bigkey.c b/db/hash/hash_bigkey.c
index d80ebedb07..94c64083f5 100644
--- a/db/hash/hash_bigkey.c
+++ b/db/hash/hash_bigkey.c
@@ -121,7 +121,7 @@ __big_insert(hashp, bufp, key, val)
if (!bufp)
return (-1);
n = p[0];
- if (!key_size)
+ if (!key_size) {
if (FREESPACE(p)) {
move_bytes = MIN(FREESPACE(p), val_size);
off = OFFSET(p) - move_bytes;
@@ -134,6 +134,7 @@ __big_insert(hashp, bufp, key, val)
OFFSET(p) = off;
} else
p[n - 2] = FULL_KEY;
+ }
p = (u_int16_t *)bufp->page;
cp = bufp->page;
bufp->flags |= BUF_MOD;
@@ -590,7 +591,7 @@ __big_split(hashp, op, np, big_keyp, addr, obucket, ret)
return (-1);
change = (__call_hash(hashp, key.data, key.size) != obucket);
- if (ret->next_addr = __find_last_page(hashp, &big_keyp)) {
+ if ((ret->next_addr = __find_last_page(hashp, &big_keyp))) {
if (!(ret->nextp =
__get_buf(hashp, ret->next_addr, big_keyp, 0)))
return (-1);;