aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/getcap.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1999-03-21 03:45:58 +0000
committerWarner Losh <imp@FreeBSD.org>1999-03-21 03:45:58 +0000
commit43b4fd733db049c2d23f19d1841acffa0deeea79 (patch)
tree58e5eff4323d3d785c763f59dd642b88fe32b275 /lib/libc/gen/getcap.c
parentbc47530cab770a098b089589f769eea314ada417 (diff)
downloadsrc-43b4fd733db049c2d23f19d1841acffa0deeea79.tar.gz
src-43b4fd733db049c2d23f19d1841acffa0deeea79.zip
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
Notes
Notes: svn path=/head/; revision=44921
Diffstat (limited to 'lib/libc/gen/getcap.c')
-rw-r--r--lib/libc/gen/getcap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index aaee0ddc3599..90fbd18a291c 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;
}
}