]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ensure that new_block is zero before use, fixes [1972d664c2].
authorRoy Marples <roy@marples.name>
Sat, 23 May 2015 08:36:34 +0000 (08:36 +0000)
committerRoy Marples <roy@marples.name>
Sat, 23 May 2015 08:36:34 +0000 (08:36 +0000)
if-options.c

index e32a0c84c31df43acefa2229178498e5aa8f6ea9..859a143ad22388920a77fe5d18dd24d883e0de4b 100644 (file)
@@ -2096,7 +2096,7 @@ read_config(struct dhcpcd_ctx *ctx,
        char *line, *buf, *option, *p;
        size_t buflen;
        ssize_t vlen;
-       int skip = 0, have_profile = 0, new_block, had_block;
+       int skip, have_profile, new_block, had_block;
 #ifndef EMBEDDED_CONFIG
        const char * const *e;
        size_t ol;
@@ -2270,6 +2270,7 @@ read_config(struct dhcpcd_ctx *ctx,
                ifo->mtime = sb.st_mtime;
 
        ldop = edop = NULL;
+       skip = have_profile = new_block = 0;
        while ((line = get_line(&buf, &buflen, fp))) {
                option = strsep(&line, " \t");
                if (line)