int len = 0;
bool var = false;
- blobmsg_alloc_string_buffer(&b, NULL, 1);
+ dest = blobmsg_alloc_string_buffer(&b, NULL, 1);
str = alloca(strlen(pattern) + 1);
strcpy(str, pattern);
next = str;
return NULL;
obj = json_object_from_file((char *) filename);
- if (!obj)
+ if (is_error(obj))
return NULL;
if (!json_object_is_type(obj, json_type_array)) {