[llvm-nm] Use aggregate initialization instead of memset zero

This commit is contained in:
Fangrui Song 2020-09-16 10:24:58 -07:00
parent f9e6d1edc0
commit 50f4c7c785
1 changed files with 1 additions and 2 deletions

View File

@ -1635,8 +1635,7 @@ static void dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
}
if (!found) {
LastSymbolName = Entry.symbolName();
NMSymbol W;
memset(&W, '\0', sizeof(NMSymbol));
NMSymbol W = {};
W.Name = Entry.symbolName();
W.Address = 0;
W.Size = 0;