Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc
b097a466c168dcdb3fde435ec4a1e0b63609f55d util: remove unused checked_realloc (Cory Fields) Pull request description: Usage was removed in 6fe50439 . This should be a NOOP. Noticed when analyzing for zenbleed exposure: stdlib calls that aren't optimized away. In this case realloc isn't making it into the final binary, but as far as I can tell this is completely dead code and should be dropped. ACKs for top commit: jonasnick: ACK b097a466c168dcdb3fde435ec4a1e0b63609f55d real-or-random: ACK b097a466c168dcdb3fde435ec4a1e0b63609f55d Tree-SHA512: d4249215eddd4035be2b50a8bb48b8a681abdab4ab41ca53f6c2a2507edfbc9ffa39ba22eb48e7da52f978e224198294495ce64f9d571d98c19283b20b82a63a
This commit is contained in:
commit
0e00fc7d10
@ -152,14 +152,6 @@ static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SECP256K1_INLINE void *checked_realloc(const secp256k1_callback* cb, void *ptr, size_t size) {
|
|
||||||
void *ret = realloc(ptr, size);
|
|
||||||
if (ret == NULL) {
|
|
||||||
secp256k1_callback_call(cb, "Out of memory");
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(__BIGGEST_ALIGNMENT__)
|
#if defined(__BIGGEST_ALIGNMENT__)
|
||||||
#define ALIGNMENT __BIGGEST_ALIGNMENT__
|
#define ALIGNMENT __BIGGEST_ALIGNMENT__
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user