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

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