Date: Wed, 4 Sep 2002 15:17:54 -0700 (PDT) From: GB Clark <gclarkii@vsservices.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/42429: hash_action called with HASH_DELETE does NOT return 1 if the key is not found Message-ID: <200209042217.g84MHsBt099116@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 42429 >Category: misc >Synopsis: hash_action called with HASH_DELETE does NOT return 1 if the key is not found >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 04 15:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: GB Clark >Release: 4.6-STABLE >Organization: VSS >Environment: FreeBSD prime.vsservices.com 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug 22 01:29:14 CDT 2002 gclarkii@prime.vsservices.com:/1002/objtree/usr/src/sys/PRIME i386 >Description: if hash_action in src/lib/libc/db/hash.c is called with HASH_DELETE, it will NOT return 1 if the key is not found as documented. >How-To-Repeat: call dbm_delete from ndbm with a non-exist key. it will return -1 instead of 1 as documented. >Fix: in hash_action if the key is not found, the default action is to return -1. HASH_GET needs to be moved below HASH_DELETE and HASH_DELETE should return 1 instead of -1. PR misc/42422 needs to be fixed also if dbm_delete is work properly. Please see freebsd-hackers for email from me for the patches. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209042217.g84MHsBt099116>