@@ -192,9 +192,9 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
192192 tl = t ; \
193193 } \
194194 c0 += tl ; /* overflow is handled on the next line */ \
195- th += (c0 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFFFFFFFFFF */ \
195+ th += (c0 < tl ); /* at most 0xFFFFFFFFFFFFFFFF */ \
196196 c1 += th ; /* overflow is handled on the next line */ \
197- c2 += (c1 < th ) ? 1 : 0 ; /* never overflows by contract (verified in the next line) */ \
197+ c2 += (c1 < th ); /* never overflows by contract (verified in the next line) */ \
198198 VERIFY_CHECK ((c1 >= th ) || (c2 != 0 )); \
199199}
200200
@@ -207,7 +207,7 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
207207 tl = t ; \
208208 } \
209209 c0 += tl ; /* overflow is handled on the next line */ \
210- th += (c0 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFFFFFFFFFF */ \
210+ th += (c0 < tl ); /* at most 0xFFFFFFFFFFFFFFFF */ \
211211 c1 += th ; /* never overflows by contract (verified in the next line) */ \
212212 VERIFY_CHECK (c1 >= th ); \
213213}
@@ -221,32 +221,32 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
221221 tl = t ; \
222222 } \
223223 th2 = th + th ; /* at most 0xFFFFFFFFFFFFFFFE (in case th was 0x7FFFFFFFFFFFFFFF) */ \
224- c2 += (th2 < th ) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
224+ c2 += (th2 < th ); /* never overflows by contract (verified the next line) */ \
225225 VERIFY_CHECK ((th2 >= th ) || (c2 != 0 )); \
226226 tl2 = tl + tl ; /* at most 0xFFFFFFFFFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFFFFFFFFFF) */ \
227- th2 += (tl2 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFFFFFFFFFF */ \
227+ th2 += (tl2 < tl ); /* at most 0xFFFFFFFFFFFFFFFF */ \
228228 c0 += tl2 ; /* overflow is handled on the next line */ \
229- th2 += (c0 < tl2 ) ? 1 : 0 ; /* second overflow is handled on the next line */ \
229+ th2 += (c0 < tl2 ); /* second overflow is handled on the next line */ \
230230 c2 += (c0 < tl2 ) & (th2 == 0 ); /* never overflows by contract (verified the next line) */ \
231231 VERIFY_CHECK ((c0 >= tl2 ) || (th2 != 0 ) || (c2 != 0 )); \
232232 c1 += th2 ; /* overflow is handled on the next line */ \
233- c2 += (c1 < th2 ) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
233+ c2 += (c1 < th2 ); /* never overflows by contract (verified the next line) */ \
234234 VERIFY_CHECK ((c1 >= th2 ) || (c2 != 0 )); \
235235}
236236
237237/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */
238238#define sumadd (a ) { \
239239 unsigned int over; \
240240 c0 += (a); /* overflow is handled on the next line */ \
241- over = (c0 < (a )) ? 1 : 0 ; \
241+ over = (c0 < (a )); \
242242 c1 += over ; /* overflow is handled on the next line */ \
243- c2 += (c1 < over ) ? 1 : 0 ; /* never overflows by contract */ \
243+ c2 += (c1 < over ); /* never overflows by contract */ \
244244}
245245
246246/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */
247247#define sumadd_fast (a ) { \
248248 c0 += (a); /* overflow is handled on the next line */ \
249- c1 += (c0 < (a )) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
249+ c1 += (c0 < (a )); /* never overflows by contract (verified the next line) */ \
250250 VERIFY_CHECK ((c1 != 0 ) | (c0 >= (a ))); \
251251 VERIFY_CHECK (c2 == 0 ); \
252252}
0 commit comments