mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf tools: Fix lsdir to set errno correctly
Fix lsdir() to set correct positive error number (ENOMEM). Since
"errno" must have a positive error number instead of negative number,
fix lsdir to set it correctly.
Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Brendan Gregg <[email protected]>
Cc: Hemant Kumar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Fixes: e1ce726e1d ("perf tools: Add lsdir() helper to read a directory")
Link: http://lkml.kernel.org/r/20160511135127.23943.40644.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
f5cd95ea60
commit
357a54f32a
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ struct strlist *lsdir(const char *name,
|
|||
|
||||
list = strlist__new(NULL, NULL);
|
||||
if (!list) {
|
||||
errno = -ENOMEM;
|
||||
errno = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue