[OpenWrt-Devel] [PATCH 2/4] swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be free'd
Alexandru Ardelean
ardeleanalex at gmail.com
Thu Jun 18 11:50:47 EDT 2015
From: Alexandru Ardelean <aa at ocedo.com>
Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
package/network/config/swconfig/src/swlib.c | 2 +-
package/network/config/swconfig/src/swlib.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c
index 334d148..f74c093 100644
--- a/package/network/config/swconfig/src/swlib.c
+++ b/package/network/config/swconfig/src/swlib.c
@@ -363,7 +363,7 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
val.value.i = atoi(str);
break;
case SWITCH_TYPE_STRING:
- val.value.s = str;
+ val.value.s = (char *)str;
break;
case SWITCH_TYPE_PORTS:
ports = alloca(sizeof(struct switch_port) * dev->ports);
diff --git a/package/network/config/swconfig/src/swlib.h b/package/network/config/swconfig/src/swlib.h
index bb2ebd8..28bdd7f 100644
--- a/package/network/config/swconfig/src/swlib.h
+++ b/package/network/config/swconfig/src/swlib.h
@@ -135,7 +135,7 @@ struct switch_val {
int err;
int port_vlan;
union {
- const char *s;
+ char *s;
int i;
struct switch_port *ports;
} value;
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list