Initialize struct members

This commit is contained in:
Shahram Najm 2021-08-20 16:10:18 +01:00
parent 6fb7c21a2d
commit 32b23dc9fd
1 changed files with 2 additions and 1 deletions

View File

@ -193,6 +193,7 @@ static grib_math* readatom(grib_context* c, char** form, int* err)
p->name = strdup(buf);
Assert(p->name);
p->left = 0;
p->right = 0;
switch (**form) {
case '(':
@ -252,9 +253,9 @@ static grib_math* readpower(grib_context* c, char** form, int* err)
{
grib_math* p = readatom(c, form, err);
while (**form == '^' || (**form == '*' && *(*form + 1) == '*')) {
grib_math* q = (grib_math*)grib_context_malloc(c, sizeof(grib_math));
q->right = 0;
q->left = p;
q->arity = 2;