From 4132e812c1036ed4e1ecfb97cd5471e621b3b36c Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Tue, 15 Jan 2013 02:03:34 +0200 Subject: [PATCH] code cleanup Signed-off-by: Mika Laitio --- cli.c | 4 +++- ucimap.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli.c b/cli.c index 0e98aa7..41179d7 100644 --- a/cli.c +++ b/cli.c @@ -403,6 +403,7 @@ static int uci_do_section_cmd(int cmd, int argc, char **argv) if (argc != 2) return 255; + printf("argv[1]: %s\n", argv[1]); if (uci_lookup_ptr(ctx, &ptr, argv[1], true) != UCI_OK) { cli_perror(); return 1; @@ -585,8 +586,9 @@ static int uci_cmd(int argc, char **argv) case CMD_DEL: case CMD_RENAME: case CMD_REVERT: - case CMD_REORDER: + case CMD_REORDER: { return uci_do_section_cmd(cmd, argc, argv); + } case CMD_SHOW: case CMD_EXPORT: case CMD_COMMIT: diff --git a/ucimap.c b/ucimap.c index 7c4fb02..0ffab94 100644 --- a/ucimap.c +++ b/ucimap.c @@ -219,7 +219,7 @@ ucimap_handle_fixup(struct uci_map *map, struct ucimap_fixup *f) break; case UCIMAP_LIST: list = f->data->list; - data = ucimap_list_append(f->data->list); + data = ucimap_list_append(list); if (!data) return false; -- 2.41.0