Date: Fri, 20 Feb 2015 00:54:05 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 42422] [libc] [patch] dbm_delete returns -1 instead of 1 when the key does not exist in the database. Message-ID: <bug-42422-8-geb8QmaY3o@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-42422-8@https.bugs.freebsd.org/bugzilla/> References: <bug-42422-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=42422 Xin LI <delphij@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |delphij@FreeBSD.org Status|In Progress |Open --- Comment #3 from Xin LI <delphij@FreeBSD.org> --- (In reply to gclarkii from comment #0) The proposed change is wrong, unfortunately. It's the manual page that should be corrected instead. To quote POSIX [1]: " RETURN VALUE The dbm_store() and dbm_delete() functions shall return 0 when they succeed and a negative value when they fail. " So, we must return a negative value, and -1 is one of the valid return values. 1 on the other hand is not. I have also checked Solaris and GDBM's implementation of the same interface and they all return -1. [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-42422-8-geb8QmaY3o>