projects
/
openwrt
/
staging
/
stintel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9f3dde
)
swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Jul 2011 04:19:59 +0000
(
04:19
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Jul 2011 04:19:59 +0000
(
04:19
+0000)
SVN-Revision: 27374
package/swconfig/src/swlib.c
patch
|
blob
|
history
diff --git
a/package/swconfig/src/swlib.c
b/package/swconfig/src/swlib.c
index c2316d06864ce554568dc107873a0b98f3025875..20e727eb5371c88bcf0c5d80c3eadc4cd98cf9f5 100644
(file)
--- a/
package/swconfig/src/swlib.c
+++ b/
package/swconfig/src/swlib.c
@@
-397,6
+397,9
@@
int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
val.value.ports = ports;
break;
case SWITCH_TYPE_NOVAL:
+ if (str && !strcmp(str, "0"))
+ return 0;
+
break;
default:
return -1;