forked from OSchip/llvm-project
Correctly compute the size in bytes of PreambleFileHash.MD5
llvm-svn: 197762
This commit is contained in:
parent
3d21975a44
commit
3ec8ee72c5
|
@ -1364,7 +1364,7 @@ ASTUnit::PreambleFileHash::createForFile(off_t Size, time_t ModTime) {
|
|||
PreambleFileHash Result;
|
||||
Result.Size = Size;
|
||||
Result.ModTime = ModTime;
|
||||
memset(Result.MD5, 0, sizeof(Result.MD5[0]) * sizeof(Result.MD5));
|
||||
memset(Result.MD5, 0, sizeof(Result.MD5));
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -1385,7 +1385,7 @@ namespace clang {
|
|||
bool operator==(const ASTUnit::PreambleFileHash &LHS,
|
||||
const ASTUnit::PreambleFileHash &RHS) {
|
||||
return LHS.Size == RHS.Size && LHS.ModTime == RHS.ModTime &&
|
||||
memcmp(LHS.MD5, RHS.MD5, sizeof(LHS.MD5[0]) * sizeof(LHS.MD5)) == 0;
|
||||
memcmp(LHS.MD5, RHS.MD5, sizeof(LHS.MD5)) == 0;
|
||||
}
|
||||
} // namespace clang
|
||||
|
||||
|
|
Loading…
Reference in New Issue