From: John Crispin Date: Tue, 7 Jul 2015 13:45:56 +0000 (+0000) Subject: swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2b9bdf4d6f665db76dc3f56efb2bb74fe2a7a3d0;p=openwrt%2Fstaging%2Fdedeckeh.git swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be free'd Signed-off-by: Alexandru Ardelean SVN-Revision: 46230 --- 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;