return 1;
}
- if (ptr.o)
- e = &ptr.o->e;
- else if (ptr.s)
- e = &ptr.s->e;
- else
- e = &ptr.p->e;
-
+ e = ptr.last;
switch(cmd) {
case CMD_CHANGES:
uci_show_changes(ptr.p);
if (ptr.value && (cmd != CMD_SET) && (cmd != CMD_ADD_LIST) && (cmd != CMD_RENAME))
return 1;
- if (ptr.o)
- e = &ptr.o->e;
- else if (ptr.s)
- e = &ptr.s->e;
- else
- e = &ptr.p->e;
-
+ e = ptr.last;
switch(cmd) {
case CMD_GET:
switch(e->type) {
ret = uci_rename(ctx, &ptr);
break;
case CMD_REVERT:
- ret = uci_revert(ctx, &ptr.p, ptr.section, ptr.option);
+ ret = uci_revert(ctx, &ptr);
break;
case CMD_SET:
ret = uci_set(ctx, ptr.p, ptr.section, ptr.option, ptr.value, NULL);