Date: Thu, 9 Jan 2003 03:20:03 -0800 (PST) From: GB Clark <gclarkii@vsservices.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/42422: dbm_delete returns -1 instead of 1 when the key does not exist in the database. Message-ID: <200301091120.h09BK3qA035364@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/42422; it has been noted by GNATS.
From: GB Clark <gclarkii@vsservices.com>
To: freebsd-gnats-submit@FreeBSD.org, gclarkii@vsservices.com
Cc:
Subject: Re: misc/42422: dbm_delete returns -1 instead of 1 when the key does
not exist in the database.
Date: Thu, 09 Jan 2003 01:32:27 -0600
This is a multi-part message in MIME format.
--------------040006030405000703060802
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
Here is a patch to correct the bug.
GB
--
GB Clark II | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?
--------------040006030405000703060802
Content-Type: text/plain;
name="db.patch.2.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="db.patch.2.txt"
*** ndbm.c Wed Sep 4 17:14:44 2002
--- ndbm.c.patched Wed Sep 4 17:15:06 2002
***************
*** 171,181 ****
dbtkey.data = key.dptr;
dbtkey.size = key.dsize;
! status = (db->del)(db, &dbtkey, 0);
! if (status)
! return (-1);
! else
! return (0);
}
/*
--- 171,178 ----
dbtkey.data = key.dptr;
dbtkey.size = key.dsize;
! return (db->del)(db, &dbtkey, 0);
!
}
/*
--------------040006030405000703060802--
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?200301091120.h09BK3qA035364>
