From owner-freebsd-bugs Wed Sep 4 15:20: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEAFD37B400 for ; Wed, 4 Sep 2002 15:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5337243E6E for ; Wed, 4 Sep 2002 15:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g84MK2JU047926 for ; Wed, 4 Sep 2002 15:20:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g84MK21S047925; Wed, 4 Sep 2002 15:20:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 361F737B400 for ; Wed, 4 Sep 2002 15:17:55 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB38443E4A for ; Wed, 4 Sep 2002 15:17:54 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g84MHsOT099117 for ; Wed, 4 Sep 2002 15:17:54 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g84MHsBt099116; Wed, 4 Sep 2002 15:17:54 -0700 (PDT) Message-Id: <200209042217.g84MHsBt099116@www.freebsd.org> Date: Wed, 4 Sep 2002 15:17:54 -0700 (PDT) From: GB Clark To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/42429: hash_action called with HASH_DELETE does NOT return 1 if the key is not found Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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