fix another initialisation error caught by Valgrind

This commit is contained in:
tg 2010-07-04 18:29:40 +00:00
parent 30046ffcf2
commit a516ea5d89

11
lex.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.114 2010/07/04 17:45:14 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.115 2010/07/04 18:29:40 tg Exp $");
/*
* states while lexing word
@ -1248,19 +1248,12 @@ pushs(int type, Area *areap)
Source *s;
s = alloc(sizeof(Source), areap);
memset(s, 0, sizeof(Source));
s->type = type;
s->str = null;
s->start = NULL;
s->line = 0;
s->errline = 0;
s->file = NULL;
s->flags = 0;
s->next = NULL;
s->areap = areap;
if (type == SFILE || type == SSTDIN)
XinitN(s->xs, 256, s->areap);
else
memset(&s->xs, 0, sizeof(s->xs));
return (s);
}