projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lua: expose add_list change items as table values
[project/uci.git]
/
file.c
diff --git
a/file.c
b/file.c
index
0530eb2
..
3cd0133
100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-398,7
+398,7
@@
static void uci_parse_config(struct uci_context *ctx, char **str)
name = next_arg(ctx, str, false, true);
assert_eol(ctx, str);
name = next_arg(ctx, str, false, true);
assert_eol(ctx, str);
- if (!name) {
+ if (!name
|| !name[0]
) {
ctx->internal = !pctx->merge;
UCI_NESTED(uci_add_section, ctx, pctx->package, type, &pctx->section);
} else {
ctx->internal = !pctx->merge;
UCI_NESTED(uci_add_section, ctx, pctx->package, type, &pctx->section);
} else {
@@
-619,7
+619,7
@@
int uci_import(struct uci_context *ctx, FILE *stream, const char *name, struct u
uci_alloc_parse_context(ctx);
pctx = ctx->pctx;
pctx->file = stream;
uci_alloc_parse_context(ctx);
pctx = ctx->pctx;
pctx->file = stream;
- if (*package && single) {
+ if (
package &&
*package && single) {
pctx->package = *package;
pctx->merge = true;
}
pctx->package = *package;
pctx->merge = true;
}