projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uloop: ignore SIGPIPE by default
[project/libubox.git]
/
examples
/
blobmsg-example.c
diff --git
a/examples/blobmsg-example.c
b/examples/blobmsg-example.c
index
6330fea
..
01b0518
100644
(file)
--- a/
examples/blobmsg-example.c
+++ b/
examples/blobmsg-example.c
@@
-1,4
+1,5
@@
#include <stdio.h>
#include <stdio.h>
+#include <inttypes.h>
#include "blobmsg.h"
#include "blobmsg_json.h"
#include "blobmsg.h"
#include "blobmsg_json.h"
@@
-34,7
+35,7
@@
static void dump_attr_data(struct blob_attr *data, int indent, int next_indent)
int type = blobmsg_type(data);
switch(type) {
case BLOBMSG_TYPE_STRING:
int type = blobmsg_type(data);
switch(type) {
case BLOBMSG_TYPE_STRING:
- indent_printf(indent, "%s\n",
(char *) blobmsg_data
(data));
+ indent_printf(indent, "%s\n",
blobmsg_get_string
(data));
break;
case BLOBMSG_TYPE_INT8:
indent_printf(indent, "%d\n", blobmsg_get_u8(data));
break;
case BLOBMSG_TYPE_INT8:
indent_printf(indent, "%d\n", blobmsg_get_u8(data));