提交 357a54f3 编写于 作者: M Masami Hiramatsu 提交者: Arnaldo Carvalho de Melo

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: NMasami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: e1ce726e ("perf tools: Add lsdir() helper to read a directory")
Link: http://lkml.kernel.org/r/20160511135127.23943.40644.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 f5cd95ea
......@@ -139,7 +139,7 @@ struct strlist *lsdir(const char *name,
list = strlist__new(NULL, NULL);
if (!list) {
errno = -ENOMEM;
errno = ENOMEM;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册