change __uci_list_add to uci_list_insert and remove an unnecessary parameter
[project/uci.git] / file.c
diff --git a/file.c b/file.c
index 2ca7fce..470071e 100644 (file)
--- a/file.c
+++ b/file.c
@@ -374,13 +374,13 @@ static void uci_parse_option(struct uci_context *ctx, char **str)
 static void uci_parse_line(struct uci_context *ctx)
 {
        struct uci_parse_context *pctx = ctx->pctx;
-       char *word, *brk;
+       char *word, *brk = NULL;
 
        for (word = strtok_r(pctx->buf, ";", &brk);
                 word;
                 word = strtok_r(NULL, ";", &brk)) {
 
-               char *pbrk;
+               char *pbrk = NULL;
                word = strtok_r(word, " \t", &pbrk);
 
                switch(word[0]) {
@@ -413,7 +413,7 @@ static void uci_parse_line(struct uci_context *ctx)
  */
 static char *uci_escape(struct uci_context *ctx, char *str)
 {
-       char *s, *p, *t;
+       char *s, *p;
        int pos = 0;
 
        if (!ctx->buf) {
@@ -535,9 +535,6 @@ int uci_load(struct uci_context *ctx, const char *name, struct uci_package **pac
        UCI_HANDLE_ERR(ctx);
        UCI_ASSERT(ctx, name != NULL);
 
-ignore:
-       ctx->errno = 0;
-
        switch (name[0]) {
        case '.':
        case '/':