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:
authorFelix Fietkau <nbd@openwrt.org>2011-03-27 04:08:51 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-03-27 04:08:51 +0400
commit89122a2c1e7f891c3ae2e8ed562d0df562d8a0f6 (patch)
treeb80f0e8b6d3936ddae56c91a8dab7f322ea3cb31 /blobmsg_json.c
parenta7c9ae6d6ac39d17670a2e881e296f7973f0fe77 (diff)
remove int16, use int8 as bool instead of integer
Diffstat (limited to 'blobmsg_json.c')
-rw-r--r--blobmsg_json.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/blobmsg_json.c b/blobmsg_json.c
index 8997214..eae2ac8 100644
--- a/blobmsg_json.c
+++ b/blobmsg_json.c
@@ -204,10 +204,7 @@ static void blobmsg_format_element(struct strbuf *s, struct blob_attr *attr, boo
data_str = buf;
switch(blob_id(attr)) {
case BLOBMSG_TYPE_INT8:
- sprintf(buf, "%d", *(uint8_t *)data);
- break;
- case BLOBMSG_TYPE_INT16:
- sprintf(buf, "%d", *(uint16_t *)data);
+ sprintf(buf, "%s", *(uint8_t *)data ? "true" : "false");
break;
case BLOBMSG_TYPE_INT32:
sprintf(buf, "%d", *(uint32_t *)data);