summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-06-10 21:44:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-06-10 21:44:16 +0000
commit2e7d800be484f00cd9ed94354585248f5b37237a (patch)
treee7c1532f317a12ef15c0fa260fcf2d33149ebbce /lib
parent5d60561e240eeb96eba85385a047d4c80597e329 (diff)
return -2 if can't open database like man page says.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/getcap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index 8643d6483f7..607b7375792 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getcap.c,v 1.4 1997/02/01 04:35:33 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getcap.c,v 1.5 1997/06/10 21:44:15 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -384,7 +384,7 @@ getent(cap, len, db_array, fd, name, depth, nfield)
if (!foundit) {
free(record);
- return (-1);
+ return (-1 - (fd < 0));
}
/*