Skip to content

Commit

Permalink
memset 0
Browse files Browse the repository at this point in the history
  • Loading branch information
zfanta committed Nov 17, 2014
1 parent c237986 commit 0d2c30d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 93,7 @@ void st_insert( char * scope, char * name, ExpType type, int lineno, int loc )
l = l->next;
if (l == NULL) /* scope not yet in table */
{ l = (ScopeList) malloc(sizeof(struct ScopeListRec));
memset(l, 0, sizeof(struct ScopeListRec));
l->parent = getParentScope(scope);
l->name = (char *)malloc(sizeof(char) * (strlen(scope) 1));
strcpy(l->name, scope);
Expand Down

0 comments on commit 0d2c30d

Please sign in to comment.