]> pilppa.com Git - uci.git/commitdiff
code cleanup
authorMika Laitio <mika.laitio@nokia.com>
Tue, 15 Jan 2013 00:03:34 +0000 (02:03 +0200)
committerMika Laitio <mika.laitio@nokia.com>
Tue, 15 Jan 2013 00:03:43 +0000 (02:03 +0200)
Signed-off-by: Mika Laitio <mika.laitio@nokia.com>
cli.c
ucimap.c

diff --git a/cli.c b/cli.c
index 0e98aa7f5e5b7bc59a5ba149d5cda2a230b7b4e1..41179d70e2dae16865237436126591e946039fb3 100644 (file)
--- 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:
index 7c4fb0240790aeb6c2386aa8c7deed8824bfda6d..0ffab944d3d354c3d7c561973e3674a76bd054e2 100644 (file)
--- 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;