Skip to content

Commit

Permalink
Adjust mask declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Feb 5, 2024
1 parent 95af95b commit 5f1e186
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/openssl/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ BSSL_NAMESPACE_END
/* use 2-arg sk_*_find for OpenSSL compatibility */ \
OPENSSL_INLINE int sk_##name##_find(const STACK_OF(name) *sk, \
constptrtype p) { \
const size_t mask = 0xffffffffffffffffUL << (sizeof(int) * 8); \
const size_t mask = sizeof(size_t) > sizeof(int) \
? (~((size_t) 0)) << (sizeof(int) * 8) \
: 0; \
size_t out_index = 0; \
int ok = OPENSSL_sk_find((const OPENSSL_STACK *)sk, &out_index, \
(const void *)p, sk_##name##_call_cmp_func); \
Expand Down

0 comments on commit 5f1e186

Please sign in to comment.