lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 May 2016 03:25:13 -0700
From:	tip-bot for Masami Hiramatsu <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	peterz@...radead.org, linux-kernel@...r.kernel.org,
	mhiramat@...nel.org, acme@...hat.com, mingo@...nel.org,
	ananth@...ux.vnet.ibm.com, brendan.d.gregg@...il.com,
	namhyung@...nel.org, tglx@...utronix.de, hemant@...ux.vnet.ibm.com,
	hpa@...or.com
Subject: [tip:perf/core] perf tools: Fix lsdir to set errno correctly

Commit-ID:  357a54f32a065835d3e6a08b07a91a57e52f32c7
Gitweb:     http://git.kernel.org/tip/357a54f32a065835d3e6a08b07a91a57e52f32c7
Author:     Masami Hiramatsu <mhiramat@...nel.org>
AuthorDate: Wed, 11 May 2016 22:51:27 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 11 May 2016 13:06:05 -0300

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 <mhiramat@...nel.org>
Cc: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@...il.com>
Cc: Hemant Kumar <hemant@...ux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Fixes: e1ce726e1db2 ("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 <acme@...hat.com>
---
 tools/perf/util/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 01c9433..eab077a 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -139,7 +139,7 @@ struct strlist *lsdir(const char *name,
 
 	list = strlist__new(NULL, NULL);
 	if (!list) {
-		errno = -ENOMEM;
+		errno = ENOMEM;
 		goto out;
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ