Search Linux Wireless

[PATCH 3/6] Constification.

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

 



---
 rfkill.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rfkill.c b/rfkill.c
index 3cb2605..8c0aea6 100644
--- a/rfkill.c
+++ b/rfkill.c
@@ -195,9 +195,9 @@ static void rfkill_block(bool all, __u32 idx, __u8 block, __u8 type)
 
 struct rfkill_type_str {
 	enum rfkill_type type;
-	char *name;
+	const char *name;
 };
-static struct rfkill_type_str rfkill_type_strings[] = {
+static const struct rfkill_type_str rfkill_type_strings[] = {
 	{	.type = RFKILL_TYPE_ALL,		.name = "all"	},
 	{	.type = RFKILL_TYPE_WLAN,		.name = "wifi"	},
 	{	.type = RFKILL_TYPE_WLAN,		.name = "wlan"	}, /* alias */
@@ -211,9 +211,9 @@ static struct rfkill_type_str rfkill_type_strings[] = {
 	{	.name = NULL }
 };
 
-static enum rfkill_type rfkill_str_to_type(char *s)
+static enum rfkill_type rfkill_str_to_type(const char *s)
 {
-	struct rfkill_type_str *p;
+	const struct rfkill_type_str *p;
 
 	for (p = rfkill_type_strings; p->name != NULL; p++) {
 		if ((strlen(s) == strlen(p->name)) && (!strcmp(s,p->name)))
@@ -244,7 +244,7 @@ static void version(void)
 	printf("rfkill %s\n", rfkill_version);
 }
 
-static void do_block_unblock(__u8 block, char *param)
+static void do_block_unblock(__u8 block, const char *param)
 {
 	enum rfkill_type t;
 	__u32 idx;
-- 
1.6.5

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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux