From: Felix Fietkau Date: Sun, 3 Jul 2011 04:19:59 +0000 (+0000) Subject: swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4ce8a045544a037e16c2ce182c7c1600c8eef7f3;p=openwrt%2Fsvn-archive%2Farchive.git swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value SVN-Revision: 27374 --- diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c index c2316d0686..20e727eb53 100644 --- 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;