Messages in this thread Patch in this message | | | From | Adrian Hunter <> | Subject | [PATCH 08/52] perf tools: Fix incorrect fd error comparison | Date | Tue, 22 Jul 2014 16:17:17 +0300 |
| |
Zero is a valid fd. Error comparison should check for negative fd.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> --- tools/perf/util/dso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index fc006fe..28cf747 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -216,7 +216,7 @@ static int open_dso(struct dso *dso, struct machine *machine) { int fd = __open_dso(dso, machine); - if (fd > 0) { + if (fd >= 0) { dso__list_add(dso); /* * Check if we crossed the allowed number -- 1.8.3.2
| |