diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index 468a0892132b14..372a3f147b0795 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -427,11 +427,8 @@ void AddFingerprintDigest( fingerprint[(3*i)+2] = ':'; } - if (md_size > 0) { - fingerprint[(3*(md_size-1))+2] = '\0'; - } else { - fingerprint[0] = '\0'; - } + DCHECK_GT(md_size, 0); + fingerprint[(3 * (md_size - 1)) + 2] = '\0'; } template