]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kconfig: incorrect 'len' field initialisation ?
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 18 May 2008 21:10:24 +0000 (23:10 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 19 May 2008 18:14:49 +0000 (20:14 +0200)
1) The field 'len' of the 'gstr' structure seems to track the size of the memory
already allocated for the "growable string". So the value of this field should be
the same as the 'malloc()' just above, shouldn't it ?

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kconfig/util.c

index f8e73c039dc880984f96aa8cadd4e43edaa6baba..3cc9f93690362ec220bb97a9d68b35cf74207dce 100644 (file)
@@ -77,7 +77,7 @@ struct gstr str_new(void)
 {
        struct gstr gs;
        gs.s = malloc(sizeof(char) * 64);
-       gs.len = 16;
+       gs.len = 64;
        strcpy(gs.s, "\0");
        return gs;
 }