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-next>] [day] [month] [year] [list]
Message-Id: <0ab674aa32a5fcc364982c78efdf44864a61523b.1284406639.git.joe@perches.com>
Date:	Mon, 13 Sep 2010 12:47:56 -0700
From:	Joe Perches <joe@...ches.com>
To:	linux-kernel@...r.kernel.org
Cc:	"David S. Miller" <davem@...emloft.net>, sparclinux@...r.kernel.org
Subject: [PATCH 18/25] drivers/serial/suncore.c: Use static const char arrays

Signed-off-by: Joe Perches <joe@...ches.com>
---
 drivers/serial/suncore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index 6381a02..f2a5b54 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -84,8 +84,8 @@ EXPORT_SYMBOL(sunserial_console_match);
 
 void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
 {
+	char mode_prop[sizeof("ttyX-mode")];
 	const char *mode, *s;
-	char mode_prop[] = "ttyX-mode";
 	int baud, bits, stop, cflag;
 	char parity;
 
@@ -106,7 +106,7 @@ void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
 		if (of_console_options)
 			c = *of_console_options;
 
-		mode_prop[3] = c;
+		sprintf(mode_prop, "tty%c-mode", c);
 
 		dp = of_find_node_by_path("/options");
 		mode = of_get_property(dp, mode_prop, NULL);
-- 
1.7.3.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ