From 89122a2c1e7f891c3ae2e8ed562d0df562d8a0f6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 27 Mar 2011 01:08:51 +0100 Subject: [PATCH] remove int16, use int8 as bool instead of integer --- blobmsg_json.c | 5 +---- 1 file changed, 1 insertion(+), 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);