Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'blobmsg.c')
-rw-r--r--blobmsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/blobmsg.c b/blobmsg.c
index e04fa53..8e2d73a 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -21,6 +21,7 @@ static const int blob_type[__BLOBMSG_TYPE_LAST] = {
[BLOBMSG_TYPE_INT32] = BLOB_ATTR_INT32,
[BLOBMSG_TYPE_INT64] = BLOB_ATTR_INT64,
[BLOBMSG_TYPE_STRING] = BLOB_ATTR_STRING,
+ [BLOBMSG_TYPE_UNSPEC] = BLOB_ATTR_BINARY,
};
static uint16_t
@@ -52,7 +53,7 @@ bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
len = blobmsg_data_len(attr);
data = blobmsg_data(attr);
- if (!id || id > BLOBMSG_TYPE_LAST)
+ if (id > BLOBMSG_TYPE_LAST)
return false;
if (!blob_type[id])