projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7c9ae6
)
remove int16, use int8 as bool instead of integer
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 27 Mar 2011 00:08:51 +0000
(
01:08
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 27 Mar 2011 00:08:51 +0000
(
01:08
+0100)
blobmsg_json.c
patch
|
blob
|
history
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index 8997214e9e9581b94c2000b10005e6e3b0262646..eae2ac898453572918e366ff616b7f77cb1659df 100644
(file)
--- 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);