projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9d0c601
)
make the uci_ptr struct reusable after a call to uci_delete()
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 20 Jan 2009 00:07:28 +0000
(
01:07
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 20 Jan 2009 00:07:28 +0000
(
01:07
+0100)
list.c
patch
|
blob
|
history
diff --git
a/list.c
b/list.c
index
cd6d305
..
9486ffb
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-567,6
+567,12
@@
int uci_delete(struct uci_context *ctx, struct uci_ptr *ptr)
uci_add_history(ctx, &p->history, UCI_CMD_REMOVE, ptr->section, ptr->option, NULL);
uci_free_any(&e);
+
+ if (ptr->option)
+ ptr->o = NULL;
+ else if (ptr->section)
+ ptr->s = NULL;
+
return 0;
}