diff options
author | imp <imp@FreeBSD.org> | 1999-03-21 03:45:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-03-21 03:45:58 +0000 |
commit | f964808ff384a3fe2549c7c50e6cda3eaa90b652 (patch) | |
tree | 11f7d704b78785efa0dfdda05c9aa0d6664ca410 /lib | |
parent | b9f0cd111bf1009f3a3b0c7fcdf92e96392bc06e (diff) | |
download | FreeBSD-src-f964808ff384a3fe2549c7c50e6cda3eaa90b652.zip FreeBSD-src-f964808ff384a3fe2549c7c50e6cda3eaa90b652.tar.gz |
Don't be so selective about which errors cause us to continue and
which ones cause us to fail. Now all open errors on the databse file
will cause the next file in the list to be tried.
Submitted by: Arne Henrik Juul <arnej@math.ntnu.no>
PR: 4585
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/getcap.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index aaee0dd..90fbd18 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -267,13 +267,8 @@ getent(cap, len, db_array, fd, name, depth, nfield) return (retval); } else { fd = open(*db_p, O_RDONLY, 0); - if (fd < 0) { - /* No error on unfound file. */ - if (errno == ENOENT) - continue; - free(record); - return (-2); - } + if (fd < 0) + continue; myfd = 1; } } |