Skip to content

Commit a5922ae

Browse files
tniessendanielleadams
authored andcommitted
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 <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 6f7dbaf commit a5922ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/crypto/crypto_common.cc

+2-5
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,8 @@ void AddFingerprintDigest(
427427
fingerprint[(3*i)+2] = ':';
428428
}
429429

430-
if (md_size > 0) {
431-
fingerprint[(3*(md_size-1))+2] = '\0';
432-
} else {
433-
fingerprint[0] = '\0';
434-
}
430+
DCHECK_GT(md_size, 0);
431+
fingerprint[(3 * (md_size - 1)) + 2] = '\0';
435432
}
436433

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

0 commit comments

Comments
 (0)