Merge bitcoin-core/secp256k1#1784: refactor: remove ret from secp256k1_ec_pubkey_serialize
3daab83a60refactor: remove ret from secp256k1_ec_pubkey_serialize (kevkevinpal) Pull request description: This is a follow-up to https://github.com/bitcoin-core/secp256k1/pull/1774#discussion_r2539737079 It is pretty straightforward to remove `ret` and to just return either `0` or `1` ACKs for top commit: real-or-random: utACK3daab83a60theStack: ACK3daab83a60Tree-SHA512: ce598d917455a2d25297436bf2b900a9e88a638617cb79ca22e467135035c334b6815911fe4429ff44dbd877e6d10a346d0b37f2e5a7459e5b35854023832d27
This commit is contained in:
@@ -268,7 +268,6 @@ int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pu
|
||||
int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
|
||||
secp256k1_ge Q;
|
||||
size_t len;
|
||||
int ret = 0;
|
||||
|
||||
VERIFY_CHECK(ctx != NULL);
|
||||
ARG_CHECK(outputlen != NULL);
|
||||
@@ -287,9 +286,9 @@ int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *o
|
||||
secp256k1_eckey_pubkey_serialize65(&Q, output);
|
||||
*outputlen = 65;
|
||||
}
|
||||
ret = 1;
|
||||
return 1;
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int secp256k1_ec_pubkey_cmp(const secp256k1_context* ctx, const secp256k1_pubkey* pubkey0, const secp256k1_pubkey* pubkey1) {
|
||||
|
||||
Reference in New Issue
Block a user