Skip to content

Commit c2caba9

Browse files
committed
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.
1 parent 0f2ab70 commit c2caba9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/crypto/crypto_common.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,8 @@ void AddFingerprintDigest(
431431
fingerprint[(3*i)+2] = ':';
432432
}
433433

434-
if (md_size > 0) {
435-
fingerprint[(3*(md_size-1))+2] = '\0';
436-
} else {
437-
fingerprint[0] = '\0';
438-
}
434+
DCHECK_GT(md_size, 0);
435+
fingerprint[(3 * (md_size - 1)) + 2] = '\0';
439436
}
440437

441438
template <const char* (*nid2string)(int nid)>

0 commit comments

Comments
 (0)