]> pilppa.com Git - uci.git/commitdiff
initialize strtok_r context to NULL
authorFelix Fietkau <nbd@openwrt.org>
Fri, 25 Jan 2008 14:18:52 +0000 (15:18 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 25 Jan 2008 14:18:52 +0000 (15:18 +0100)
file.c

diff --git a/file.c b/file.c
index 36ef34684539f9ea9ed5b26c20997acb777e95d8..470071e33e101f3ea22064bd7df35a26caaec9da 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]) {