Skip to content

Commit 0f7657d

Browse files
Merge #1366: field: Use restrict consistently in fe_sqrt
b79ba8a field: Use `restrict` consistently in fe_sqrt (Tim Ruffing) Pull request description: 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. edit: Changed the description. I'm not entirely sure but after looking at the standard, I tend to think this is more than a cosmetic change, and only this change actually makes the parameters `restrict`. Anyway, I believe making them `restrict` was simply forgotten in be82bd8. ACKs for top commit: sipa: utACK b79ba8a Tree-SHA512: eecec7674d8cef7833d50f4041b87241ca8de4839aa8027df1c422b89f5a1bcef3916ac785057a596c459ce1aa9d41e5a21ecb6fed9c5d15a1d9f588c7ee208e
2 parents cc55757 + b79ba8a commit 0f7657d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/field_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const
4444
return secp256k1_fe_normalizes_to_zero_var(&na);
4545
}
4646

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

0 commit comments

Comments
 (0)