X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fblobmsg-example.c;h=01b05181ebc8704491c7cd70617f94e76c66df80;hb=02db6d71b67d9efe33292fbf7f92da888aaf879f;hp=6330fea33095fdf9dfcbd87eee6dbd8e78fa6485;hpb=b538c2b20ea4972efa3e223e8f01bd5441f35375;p=project%2Flibubox.git diff --git a/examples/blobmsg-example.c b/examples/blobmsg-example.c index 6330fea..01b0518 100644 --- a/examples/blobmsg-example.c +++ b/examples/blobmsg-example.c @@ -1,4 +1,5 @@ #include +#include #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: - 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));