]> pilppa.org Git - uci.git/commitdiff
Merge remote branch 'uci_upstream_remote/master' into uci_upstream_merge uci_upstream_merge
authorMika Laitio <lamikr@pilppa.org>
Sun, 30 Jan 2011 12:50:18 +0000 (14:50 +0200)
committerMika Laitio <lamikr@pilppa.org>
Sun, 30 Jan 2011 12:50:18 +0000 (14:50 +0200)
file.c
list.c

diff --git a/file.c b/file.c
index 867984120b6c250b71e5a3a3f6436d13568cb71c..60946ef7d710cd76ad2aac939cd31ad6ad97a180 100644 (file)
--- a/file.c
+++ b/file.c
@@ -675,7 +675,7 @@ static char *uci_config_path(struct uci_context *ctx, const char *name)
        return filename;
 }
 
-void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool overwrite)
+static void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool overwrite)
 {
        struct uci_package *p = *package;
        FILE *f = NULL;
diff --git a/list.c b/list.c
index 661ecc6ded8f3a334cae1eeb4ef961d4d550cd27..31ee551409d34bdb319ddb3234483ad2e5f1ba25 100644 (file)
--- a/list.c
+++ b/list.c
@@ -19,11 +19,12 @@ static void uci_list_set_pos(struct uci_list *head, struct uci_list *ptr, int po
 
        uci_list_del(ptr);
        uci_foreach_element(head, p) {
-               new_head = &p->list;
                if (pos-- <= 0)
                        break;
+               new_head = &p->list;
        }
-       uci_list_add(new_head, ptr);
+
+       uci_list_add(new_head->next, ptr);
 }
 
 static inline void uci_list_fixup(struct uci_list *ptr)