Skip to content

Commit 3daab83

Browse files
committed
refactor: remove ret from secp256k1_ec_pubkey_serialize
1 parent e7f7083 commit 3daab83

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/secp256k1.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pu
268268
int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) {
269269
secp256k1_ge Q;
270270
size_t len;
271-
int ret = 0;
272271

273272
VERIFY_CHECK(ctx != NULL);
274273
ARG_CHECK(outputlen != NULL);
@@ -287,9 +286,9 @@ int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *o
287286
secp256k1_eckey_pubkey_serialize65(&Q, output);
288287
*outputlen = 65;
289288
}
290-
ret = 1;
289+
return 1;
291290
}
292-
return ret;
291+
return 0;
293292
}
294293

295294
int secp256k1_ec_pubkey_cmp(const secp256k1_context* ctx, const secp256k1_pubkey* pubkey0, const secp256k1_pubkey* pubkey1) {

0 commit comments

Comments
 (0)