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>] [day] [month] [year] [list]
Date:   Tue, 11 Sep 2018 14:31:02 +0530
From:   Mamatha Inamdar <mamatha4@...ux.vnet.ibm.com>
To:     linux-kernel@...r.kernel.org
Subject: [PATCH] selftest:powerpc:dscr:fix compile error in dscr_sysfs_test

This patch is to fix the following compile error ocured when building
with gcc7:

[stderr] dscr_sysfs_test.c: In function ‘dscr_sysfs’:
[stderr] dscr_sysfs_test.c:63:20: error: ‘%s’ directive writing up to 255 bytes

Signed-off-by: Mamatha Inamdar <mamatha4@...ux.vnet.ibm.com>
---
 .../selftests/powerpc/dscr/dscr_sysfs_test.c       |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c b/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
index 1899bd8..72e3af0 100644
--- a/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
+++ b/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
@@ -62,7 +62,7 @@ static int check_all_cpu_dscr_defaults(unsigned long val)
 		if (!strstr(dp->d_name, "cpu"))
 			continue;
 
-		len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name);
+		len = snprintf(file, LEN_MAX, "%scpu%ld/dscr", CPU_PATH, val);
 		if (len >= LEN_MAX)
 			continue;
 		if (access(file, F_OK))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ