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>
This commit is contained in:
parent
3d5d68aabf
commit
ab7322af8c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user