field_gmp's negate doesn't need to use the magnitude argument.

This commit is contained in:
Gregory Maxwell 2014-11-12 15:59:26 -08:00
parent f0709ac57e
commit 861f9a59cc
2 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,8 @@ noinst_HEADERS += src/field_5x52_int128_impl.h
noinst_HEADERS += src/field_5x52_asm_impl.h noinst_HEADERS += src/field_5x52_asm_impl.h
noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h
noinst_HEADERS += src/util.h noinst_HEADERS += src/util.h
noinst_HEADERS += src/util_impl.h noinst_HEADERS += src/testrand.h
noinst_HEADERS += src/testrand_impl.h
noinst_HEADERS += src/field_gmp.h noinst_HEADERS += src/field_gmp.h
noinst_HEADERS += src/field_gmp_impl.h noinst_HEADERS += src/field_gmp_impl.h
noinst_HEADERS += src/field.h noinst_HEADERS += src/field.h

View File

@ -97,6 +97,7 @@ static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) {
} }
SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) { SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) {
(void)m;
*r = *a; *r = *a;
secp256k1_fe_normalize(r); secp256k1_fe_normalize(r);
for (int i=0; i<FIELD_LIMBS; i++) for (int i=0; i<FIELD_LIMBS; i++)