projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9efd0d9
)
more cleanup
author
Felix Fietkau
<nbd@pi.lan>
Fri, 22 Aug 2008 18:30:17 +0000
(20:30 +0200)
committer
Felix Fietkau
<nbd@pi.lan>
Fri, 22 Aug 2008 18:30:17 +0000
(20:30 +0200)
file.c
patch
|
blob
|
history
list.c
patch
|
blob
|
history
diff --git
a/file.c
b/file.c
index
c670f04
..
04ef91e
100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-123,13
+123,7
@@
static void uci_parse_config(struct uci_context *ctx, char **str)
assert_eol(ctx, str);
if (pctx->merge) {
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);
}
} else
pctx->section = uci_alloc_section(pctx->package, type, name);
}
@@
-154,12
+148,7
@@
static void uci_parse_option(struct uci_context *ctx, char **str)
assert_eol(ctx, str);
if (pctx->merge) {
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);
}
} else
uci_alloc_option(pctx->section, name, value);
}
diff --git
a/list.c
b/list.c
index
98a6e28
..
83f016e
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-269,7
+269,8
@@
uci_free_any(struct uci_element **e)
*e = NULL;
}
*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;
{
struct uci_element *e;
@@
-280,7
+281,8
@@
static struct uci_element *uci_lookup_list(struct uci_list *list, const char *na
return NULL;
}
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;
{
char *idxstr, *t, *section, *name;
struct uci_element *e = NULL;
@@
-354,7
+356,8
@@
done:
return e;
}
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;
{
struct uci_element *e;