Fix debug symbols loading in libproc: 0 is a valid file descriptor.

Reported by:	Chris Torek <chris.torek@gmail.com>
This commit is contained in:
Stanislav Sedov 2015-03-13 04:26:48 +00:00
parent bedf67ae99
commit 0faaddb8db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279946

View File

@ -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));