Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/db/hash don't compare non-pointer values against NULL.



details:   https://anonhg.NetBSD.org/src/rev/5c2dfc860bd9
branches:  trunk
changeset: 474529:5c2dfc860bd9
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 10 17:48:54 1999 +0000

description:
don't compare non-pointer values against NULL.

diffstat:

 lib/libc/db/hash/hash_bigkey.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9bbfef6959e5 -r 5c2dfc860bd9 lib/libc/db/hash/hash_bigkey.c
--- a/lib/libc/db/hash/hash_bigkey.c    Sat Jul 10 16:46:19 1999 +0000
+++ b/lib/libc/db/hash/hash_bigkey.c    Sat Jul 10 17:48:54 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash_bigkey.c,v 1.9 1998/12/09 12:42:49 christos Exp $ */
+/*     $NetBSD: hash_bigkey.c,v 1.10 1999/07/10 17:48:54 christos Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)hash_bigkey.c      8.3 (Berkeley) 5/31/94";
 #else
-__RCSID("$NetBSD: hash_bigkey.c,v 1.9 1998/12/09 12:42:49 christos Exp $");
+__RCSID("$NetBSD: hash_bigkey.c,v 1.10 1999/07/10 17:48:54 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -600,7 +600,7 @@
                return (-1);
        change = (__call_hash(hashp, key.data, (int)key.size) != obucket);
 
-       if ((ret->next_addr = __find_last_page(hashp, &big_keyp)) != NULL) {
+       if ((ret->next_addr = __find_last_page(hashp, &big_keyp)) != 0) {
                if (!(ret->nextp =
                    __get_buf(hashp, (u_int32_t)ret->next_addr, big_keyp, 0)))
                        return (-1);;



Home | Main Index | Thread Index | Old Index