[PATCH 08/17] zramctl: fix two format string warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both warnings were similar.

sys-utils/zramctl.c:527:23: warning: format string is not a string
literal (potentially insecure) [-Wformat-security]
                                err(EXIT_FAILURE, zram->devname);

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/zramctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
index 961dba1..786be06 100644
--- a/sys-utils/zramctl.c
+++ b/sys-utils/zramctl.c
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
 		if (optind < argc) {
 			zram = new_zram(argv[optind++]);
 			if (!zram_exist(zram))
-				err(EXIT_FAILURE, zram->devname);
+				err(EXIT_FAILURE, "%s", zram->devname);
 		}
 		status(zram);
 		free_zram(zram);
@@ -560,7 +560,7 @@ int main(int argc, char **argv)
 		else {
 			zram = new_zram(argv[optind]);
 			if (!zram_exist(zram))
-				err(EXIT_FAILURE, zram->devname);
+				err(EXIT_FAILURE, "%s", zram->devname);
 		}
 
 		if (zram_set_u64parm(zram, "reset", 1))
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux