X-Git-Url: http://git.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=list.c;h=f3a9ed6fa8566a8b30f83bbf61ba371b42ade08c;hp=bf0f376dacefc422cf2643bea9d7fc970da89005;hb=b42ee8f21842fab41a4cdf27960000bb1b3f42a7;hpb=e81961bde820a84bf67ccd5e40b29f7952dd1f77 diff --git a/list.c b/list.c index bf0f376..f3a9ed6 100644 --- a/list.c +++ b/list.c @@ -217,7 +217,7 @@ uci_free_section(struct uci_section *s) uci_free_element(&s->e); } -__plugin struct uci_package * +__private struct uci_package * uci_alloc_package(struct uci_context *ctx, const char *name) { struct uci_package *p; @@ -559,7 +559,7 @@ int uci_delete(struct uci_context *ctx, struct uci_ptr *ptr) UCI_ASSERT(ctx, ptr->s); - if (ptr->value && ptr->o && ptr->o->type == UCI_TYPE_LIST) { + if (ptr->value && *ptr->value && ptr->o && ptr->o->type == UCI_TYPE_LIST) { if (!sscanf(ptr->value, "%d", &index)) return 1;