From 70ec4494a191f8b965eacd942288fb5e4ff093eb Mon Sep 17 00:00:00 2001
From: Dmitri Gribenko <gribozavr@gmail.com>
Date: Fri, 20 Dec 2013 01:07:30 +0000
Subject: [PATCH] Correctly compute the size in bytes of PreambleFileHash.MD5

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197762 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/Frontend/ASTUnit.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 350ed73068f..6f6283bc8e7 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -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
 
-- 
GitLab