diff options
author | John Crispin <blogic@openwrt.org> | 2015-07-07 13:45:56 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-07-07 13:45:56 +0000 |
commit | 7b458cc164441f85d3a574843bd6f1423f982300 (patch) | |
tree | 938df9ef18188034cb4881f41f1f18fbf0b45c0b | |
parent | b0d7b73f547a3824c32370b7ba620d8050292aa3 (diff) | |
download | master-187ad058-7b458cc164441f85d3a574843bd6f1423f982300.tar.gz master-187ad058-7b458cc164441f85d3a574843bd6f1423f982300.tar.bz2 master-187ad058-7b458cc164441f85d3a574843bd6f1423f982300.zip |
swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be free'd
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46230 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/config/swconfig/src/swlib.c | 2 | ||||
-rw-r--r-- | 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 334d148c36..f74c093ef4 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 bb2ebd87d6..28bdd7f7cb 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; |