summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-11-23 19:11:44 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-11-23 19:11:44 +0100
commite64cbdd9b405a3246abfe23d8f16bd32647b2d04 (patch)
tree44cbb89def7271e0af71b0f53ac9ef15b972a7b1
parentfb6e4604fb689d1918db3804a766b865cfaacbef (diff)
downloadrpcd-e64cbdd9b405a3246abfe23d8f16bd32647b2d04.tar.gz
uci: allow setting zero-length values (to delete an option)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--uci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/uci.c b/uci.c
index 421a4c7..72ae5a6 100644
--- a/uci.c
+++ b/uci.c
@@ -272,8 +272,7 @@ rpc_uci_format_blob(struct blob_attr *v, const char **p)
switch (blobmsg_type(v))
{
case BLOBMSG_TYPE_STRING:
- if (blobmsg_data_len(v) > 1)
- *p = blobmsg_data(v);
+ *p = blobmsg_data(v);
break;
case BLOBMSG_TYPE_INT64: