From: Christophe Jaillet Date: Sun, 18 May 2008 21:10:24 +0000 (+0200) Subject: kconfig: incorrect 'len' field initialisation ? X-Git-Tag: MMI-PSA29.97-13-9~34244^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=107f43a0f7282511ec570214a0b8f639224ff525;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git kconfig: incorrect 'len' field initialisation ? 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 Signed-off-by: Sam Ravnborg --- diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index f8e73c039dc8..3cc9f9369036 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -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; }