summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getcap.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-06-10 21:44:15 +0000
committermillert <millert@openbsd.org>1997-06-10 21:44:15 +0000
commit538347e131cfb8deed208b3dc18d15cc450ed480 (patch)
tree9cba2b92ce6366b8b59e8774e066991dc2827591 /lib/libc/gen/getcap.c
parentChange a long to and int. (diff)
downloadwireguard-openbsd-538347e131cfb8deed208b3dc18d15cc450ed480.tar.xz
wireguard-openbsd-538347e131cfb8deed208b3dc18d15cc450ed480.zip
return -2 if can't open database like man page says.
Diffstat (limited to 'lib/libc/gen/getcap.c')
-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));
}
/*