Skip to content

Commit

Permalink
remove unneeded VERIFY_SETUP uses in ECMULT_CONST_TABLE_GET_GE macro
Browse files Browse the repository at this point in the history
As the fields r->x and r->y are set immediately after (three lines
below), there is no need to clear them.
  • Loading branch information
theStack committed Dec 1, 2023
1 parent a0fb68a commit a3a3e11
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/ecmult_const_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ static void secp256k1_ecmult_const_odd_multiples_table_globalz(secp256k1_ge *pre
secp256k1_fe neg_y; \
VERIFY_CHECK((n) < (1U << ECMULT_CONST_GROUP_SIZE)); \
VERIFY_CHECK(index < (1U << (ECMULT_CONST_GROUP_SIZE - 1))); \
VERIFY_SETUP(secp256k1_fe_clear(&(r)->x)); \
VERIFY_SETUP(secp256k1_fe_clear(&(r)->y)); \
/* Unconditionally set r->x = (pre)[m].x. r->y = (pre)[m].y. because it's either the correct one
* or will get replaced in the later iterations, this is needed to make sure `r` is initialized. */ \
(r)->x = (pre)[m].x; \
Expand Down

0 comments on commit a3a3e11

Please sign in to comment.