diff options
author | 2015-04-09 13:53:53 +0000 | |
---|---|---|
committer | 2015-04-09 15:36:59 +0000 | |
commit | 7390ddb61a9c425a673a693279073b85b3cb28ef (patch) | |
tree | 84d77b1978680b9009cbd3a47491e8bd12c51fc6 /src | |
parent | 0f35340eae696acf1901f3aca77109b91fd2aaa8 (diff) |
Cleanup: Create hash buffer reusing Md5Digest's length constant.
--
Change-Id: I67fa2a289cf82a4aee6b724429c1a1719c5649b4
MOS_MIGRATED_REVID=90707308
Diffstat (limited to 'src')
-rw-r--r-- | src/main/cpp/blaze.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 758f16207b..63671aaa4d 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -66,6 +66,7 @@ #include "archive.h" #include "archive_entry.h" +using blaze_util::Md5Digest; using std::set; using std::vector; @@ -159,8 +160,8 @@ void InitGlobals() { // string. The resulting dir is composed of the root + md5(hashable) static string GetHashedBaseDir(const string &root, const string &hashable) { - unsigned char buf[17]; - blaze_util::Md5Digest digest; + unsigned char buf[Md5Digest::kDigestLength]; + Md5Digest digest; digest.Update(hashable.data(), hashable.size()); digest.Finish(buf); return root + "/" + digest.String(); |