Skip to content
Snippets Groups Projects
Commit b017df38 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value

SVN-Revision: 27374
parent f9f3ddeb
No related branches found
No related tags found
No related merge requests found
...@@ -397,6 +397,9 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por ...@@ -397,6 +397,9 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
val.value.ports = ports; val.value.ports = ports;
break; break;
case SWITCH_TYPE_NOVAL: case SWITCH_TYPE_NOVAL:
if (str && !strcmp(str, "0"))
return 0;
break; break;
default: default:
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment