Commit 107f43a0 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Sam Ravnborg

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: default avatarChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 7b97887e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment