assert_eol(ctx, str);
if (pctx->merge) {
- UCI_TRAP_SAVE(ctx, error);
- if (uci_set(ctx, pctx->package, name, NULL, type, NULL) != UCI_OK)
- goto error;
- UCI_TRAP_RESTORE(ctx);
- return;
-error:
- UCI_THROW(ctx, ctx->err);
+ UCI_NESTED(uci_set, ctx, pctx->package, name, NULL, type, NULL);
} else
pctx->section = uci_alloc_section(pctx->package, type, name);
}
assert_eol(ctx, str);
if (pctx->merge) {
- UCI_TRAP_SAVE(ctx, error);
- uci_set(ctx, pctx->package, pctx->section->e.name, name, value, NULL);
- UCI_TRAP_RESTORE(ctx);
- return;
-error:
- UCI_THROW(ctx, ctx->err);
+ UCI_NESTED(uci_set, ctx, pctx->package, pctx->section->e.name, name, value, NULL);
} else
uci_alloc_option(pctx->section, name, value);
}
*e = NULL;
}
-static struct uci_element *uci_lookup_list(struct uci_list *list, const char *name)
+static inline struct uci_element *
+uci_lookup_list(struct uci_list *list, const char *name)
{
struct uci_element *e;
return NULL;
}
-static struct uci_element *uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
+static struct uci_element *
+uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
{
char *idxstr, *t, *section, *name;
struct uci_element *e = NULL;
return e;
}
-int uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended)
+int
+uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended)
{
struct uci_element *e;