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> SVN-Revision: 46230
This commit is contained in:
		@@ -363,7 +363,7 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
 | 
				
			|||||||
		val.value.i = atoi(str);
 | 
							val.value.i = atoi(str);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case SWITCH_TYPE_STRING:
 | 
						case SWITCH_TYPE_STRING:
 | 
				
			||||||
		val.value.s = str;
 | 
							val.value.s = (char *)str;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case SWITCH_TYPE_PORTS:
 | 
						case SWITCH_TYPE_PORTS:
 | 
				
			||||||
		ports = alloca(sizeof(struct switch_port) * dev->ports);
 | 
							ports = alloca(sizeof(struct switch_port) * dev->ports);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -135,7 +135,7 @@ struct switch_val {
 | 
				
			|||||||
	int err;
 | 
						int err;
 | 
				
			||||||
	int port_vlan;
 | 
						int port_vlan;
 | 
				
			||||||
	union {
 | 
						union {
 | 
				
			||||||
		const char *s;
 | 
							char *s;
 | 
				
			||||||
		int i;
 | 
							int i;
 | 
				
			||||||
		struct switch_port *ports;
 | 
							struct switch_port *ports;
 | 
				
			||||||
	} value;
 | 
						} value;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user