summaryrefslogtreecommitdiffstats
path: root/lib/libproc
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2015-03-13 04:26:48 +0000
committerstas <stas@FreeBSD.org>2015-03-13 04:26:48 +0000
commit6813bc690f7473c39d35c0ea349b9cc6d6b0b422 (patch)
tree631cc5dccd5bbb24fae1a8de8614cb65b29fed36 /lib/libproc
parent41a580aa368e95deac0dfa65afed0e2b4ace93ea (diff)
downloadFreeBSD-src-6813bc690f7473c39d35c0ea349b9cc6d6b0b422.zip
FreeBSD-src-6813bc690f7473c39d35c0ea349b9cc6d6b0b422.tar.gz
Fix debug symbols loading in libproc: 0 is a valid file descriptor.
Reported by: Chris Torek <chris.torek@gmail.com>
Diffstat (limited to 'lib/libproc')
-rw-r--r--lib/libproc/proc_sym.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c
index 5c5ac55..dd52638 100644
--- a/lib/libproc/proc_sym.c
+++ b/lib/libproc/proc_sym.c
@@ -91,7 +91,7 @@ find_dbg_obj(const char *path)
snprintf(dbg_path, sizeof(dbg_path),
"/usr/lib/debug/%s.debug", path);
fd = open(dbg_path, O_RDONLY);
- if (fd > 0)
+ if (fd >= 0)
return (fd);
else
return (open(path, O_RDONLY));
OpenPOWER on IntegriCloud