summaryrefslogtreecommitdiff
path: root/tools/perf/util/strlist.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-07-16 11:08:34 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-07-16 11:08:34 -0300
commitab7322af8c620987ed058e39506c97e5f2d3c65c (patch)
treec06ec2f7a82bc633e2f802066c751e13c959851b /tools/perf/util/strlist.c
parent3d5d68aabf4ff47cfb447ad90448ce50531be7f5 (diff)
perf strlist: load() should return a negative errno
To match what its users return. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-jntpe2lwg1fxn1bku7uccan0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/strlist.c')
-rw-r--r--tools/perf/util/strlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index 71f9d102b96f..68ae673f9fb6 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -72,7 +72,7 @@ int strlist__load(struct strlist *slist, const char *filename)
FILE *fp = fopen(filename, "r");
if (fp == NULL)
- return errno;
+ return -errno;
while (fgets(entry, sizeof(entry), fp) != NULL) {
const size_t len = strlen(entry);