From a5c84bef36cf36977a8271905f3c906bb612e484 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 25 Jan 2008 15:18:52 +0100 Subject: [PATCH] initialize strtok_r context to NULL --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 36ef346..470071e 100644 --- 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]) { -- 2.41.1