Commit b12169ee authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Fix comment about undefined behavior of constant_time_msb



This comment was correct for the original commit introducing this
function (5a3d21c0), but was fixed
in commit d2fa1829 (and
67b8bcee)

Reviewed-by: default avatarBen Kaduk <kaduk@mit.edu>
GH: #4975
parent 4dfe4310
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -31,12 +31,7 @@ extern "C" {
 *      c = constant_time_select(lt, a, b);
 */

/*
 * Returns the given value with the MSB copied to all the other
 * bits. Uses the fact that arithmetic shift shifts-in the sign bit.
 * However, this is not ensured by the C standard so you may need to
 * replace this with something else on odd CPUs.
 */
/* Returns the given value with the MSB copied to all the other bits. */
static ossl_inline unsigned int constant_time_msb(unsigned int a);
/* Convenience method for uint64_t. */
static ossl_inline uint64_t constant_time_msb_64(uint64_t a);