Date: Wed, 4 Sep 2002 13:28:40 -0700 (PDT) From: GB Clark <gclarkii@vsservices.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/42422: dbm_delete returns -1 instead of 1 when the key does not exist in the database. Message-ID: <200209042028.g84KSelW090665@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 42422 >Category: misc >Synopsis: dbm_delete returns -1 instead of 1 when the key does not exist in the database. >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 13:30: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: dbm_delete is documented to return 1 if the key does NOT exist in the dbm file. In lib/libc/db/ndmb.c it returns -1 or 0 only. >How-To-Repeat: Try to delete a non-exist key and get -1 instead of 1 using dbm_delete. >Fix: have dbm_delete in lib/libc/db/ndbm.c return status instead of the if switch. The original db delete function returns the SAME status codes as dbm_delete according to the man page for db. >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?200209042028.g84KSelW090665>