swconfig: swlib.c: remove const qualifier for val.s since this is supposed to be...
authorJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:45:56 +0000 (13:45 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:45:56 +0000 (13:45 +0000)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
SVN-Revision: 46230

package/network/config/swconfig/src/swlib.c
package/network/config/swconfig/src/swlib.h

index 334d148c3694259efa1403d9872ba103dd29ca8c..f74c093ef4ea4490f69a5d3f8f73ff09a90b7bdb 100644 (file)
@@ -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);
index bb2ebd87d63d2099b0e9dd04ded4fb1f0cdbf506..28bdd7f7cbea22c1070c98cc72c93fe04bc6ae5f 100644 (file)
@@ -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;