Skip to content
Permalink
Browse files
src: remove dead code in AddFingerprintDigest
This function is never called with md_size == 0, and it would make no
sense to do so in the future either.

PR-URL: #42145
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
tniessen authored and danielleadams committed Apr 24, 2022
1 parent 33b11a3 commit 30264490093db835eebf05415d30eed8eb20e93c
Showing with 2 additions and 5 deletions.
  1. +2 −5 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 <const char* (*nid2string)(int nid)>

0 comments on commit 3026449

Please sign in to comment.