From e64cbdd9b405a3246abfe23d8f16bd32647b2d04 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 23 Nov 2015 19:11:44 +0100 Subject: [PATCH] uci: allow setting zero-length values (to delete an option) Signed-off-by: Jo-Philipp Wich --- uci.c | 3 +-- 1 file changed, 1 insertion(+), 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: -- 2.25.1