summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2017-12-23 23:32:11 +0100
committerKurt Roeckx <kurt@roeckx.be>2017-12-25 13:29:51 +0100
commitb12169eeafcd7660dce76cc290e379040a638fde (patch)
treee62c9b73202930ff1c3b101e8ef2038818b6bbb6 /include
parent4dfe4310c31c4483705991d9a798ce9be1ed1c68 (diff)
Fix comment about undefined behavior of constant_time_msb
This comment was correct for the original commit introducing this function (5a3d21c0585064292bde5cd34089e120487ab687), but was fixed in commit d2fa182988afa33d9e950358de406cc9fb36d000 (and 67b8bcee95f225a07216700786b538bb98d63cfe) Reviewed-by: Ben Kaduk <kaduk@mit.edu> GH: #4975
Diffstat (limited to 'include')
-rw-r--r--include/internal/constant_time_locl.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/internal/constant_time_locl.h b/include/internal/constant_time_locl.h
index 8b714fb69f..c60e59c6a5 100644
--- a/include/internal/constant_time_locl.h
+++ b/include/internal/constant_time_locl.h
@@ -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);