Skip to content

Commit f6d9a11

Browse files
committed
pubkey_load: replace ARG_CHECK with VERIFY_CHECK
This change prepares for the addition of ge_from_bytes and ge_to_bytes which do not take a context. This change should be inconsequential because it's very unlikely to land in the `sizeof(secp256k1_ge_storage) != 64` branch and the other branch does not have an ARG_CHECK either.
1 parent 1a8f4c2 commit f6d9a11

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/secp256k1.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,11 @@ static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge,
247247
} else {
248248
/* Otherwise, fall back to 32-byte big endian for X and Y. */
249249
secp256k1_fe x, y;
250-
ARG_CHECK(secp256k1_fe_set_b32_limit(&x, pubkey->data));
251-
ARG_CHECK(secp256k1_fe_set_b32_limit(&y, pubkey->data + 32));
250+
int ret = 1;
251+
252+
ret &= secp256k1_fe_set_b32_limit(&x, pubkey->data);
253+
ret &= secp256k1_fe_set_b32_limit(&y, pubkey->data + 32);
254+
VERIFY_CHECK(ret);
252255
secp256k1_ge_set_xy(ge, &x, &y);
253256
}
254257
ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));

0 commit comments

Comments
 (0)