diff options
| author | Quentin Carbonneaux <[email protected]> | 2016-12-09 04:26:11 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2016-12-12 19:24:39 -0500 |
| commit | 2380b5786a515af7149f7648d9e9c22a663e3a9c (patch) | |
| tree | a6dd0174cfc55f81c2f2b660032b8feb7998a703 /util.c | |
| parent | 00f3d2228b96c03e63091f4c92fee0478f39328e (diff) | |
make newtmp() return zeroed out temporaries
This was not necessary as temporaries were never freed
and returned from an array zero initialized. But in the
coming load optimization, we sometimes free temporaries
by resetting fn->ntmp.
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -250,6 +250,7 @@ newtmp(char *prfx, int k, Fn *fn) t = fn->ntmp++; vgrow(&fn->tmp, fn->ntmp); + memset(&fn->tmp[t], 0, sizeof(Tmp)); if (prfx) sprintf(fn->tmp[t].name, "%s.%d", prfx, ++n); fn->tmp[t].cls = k; |
