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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 6 Oct 2007 10:02:29 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	David Brownell <dbrownell@...rs.sourceforge.net>,
	Andrew Morton <akpm@...l.org>,
	spi-devel-general@...ts.sourceforge.net,
	Anton Vorontsov <avorontsov@...mvista.com>
Subject: [Patch]Documentation/spi/spidev_test.c: constify some variables


Constify two char pointers and a struct in Documentation/spi/spidev_test.c.

CC: David Brownell <dbrownell@...rs.sourceforge.net>
CC: Anton Vorontsov <avorontsov@...mvista.com>
Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>

---
 Documentation/spi/spidev_test.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.23-rc9/Documentation/spi/spidev_test.c
===================================================================
--- linux-2.6.23-rc9.orig/Documentation/spi/spidev_test.c
+++ linux-2.6.23-rc9/Documentation/spi/spidev_test.c
@@ -29,7 +29,7 @@ static void pabort(const char *s)
 	abort();
 }
 
-static char *device = "/dev/spidev1.1";
+static const char *device = "/dev/spidev1.1";
 static uint8_t mode;
 static uint8_t bits = 8;
 static uint32_t speed = 500000;
@@ -69,7 +69,7 @@ static void transfer(int fd)
 	puts("");
 }
 
-void print_usage(char *prog)
+void print_usage(const char *prog)
 {
 	printf("Usage: %s [-DsbdlHOLC3]\n", prog);
 	puts("  -D --device   device to use (default /dev/spidev1.1)\n"
@@ -88,7 +88,7 @@ void print_usage(char *prog)
 void parse_opts(int argc, char *argv[])
 {
 	while (1) {
-		static struct option lopts[] = {
+		static const struct option lopts[] = {
 			{ "device",  1, 0, 'D' },
 			{ "speed",   1, 0, 's' },
 			{ "delay",   1, 0, 'd' },
-
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