Skip to content

Commit

Permalink
field: Use restrict consistently in fe_sqrt
Browse files Browse the repository at this point in the history
That is, use it also in the definition and not only the declaration.

I believe this was the intention of commit
be82bd8, but it was omitted there.
  • Loading branch information
real-or-random committed Jul 6, 2023
1 parent 0fa84f8 commit b79ba8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/field_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const
return secp256k1_fe_normalizes_to_zero_var(&na);
}

static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a) {
static int secp256k1_fe_sqrt(secp256k1_fe * SECP256K1_RESTRICT r, const secp256k1_fe * SECP256K1_RESTRICT a) {
/** Given that p is congruent to 3 mod 4, we can compute the square root of
* a mod p as the (p+1)/4'th power of a.
*
Expand Down

0 comments on commit b79ba8a

Please sign in to comment.