@@ -271,9 +271,9 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
271
271
tl = t ; \
272
272
} \
273
273
c0 += tl ; /* overflow is handled on the next line */ \
274
- th += (c0 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFF */ \
274
+ th += (c0 < tl ); /* at most 0xFFFFFFFF */ \
275
275
c1 += th ; /* overflow is handled on the next line */ \
276
- c2 += (c1 < th ) ? 1 : 0 ; /* never overflows by contract (verified in the next line) */ \
276
+ c2 += (c1 < th ); /* never overflows by contract (verified in the next line) */ \
277
277
VERIFY_CHECK ((c1 >= th ) || (c2 != 0 )); \
278
278
}
279
279
@@ -286,7 +286,7 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
286
286
tl = t ; \
287
287
} \
288
288
c0 += tl ; /* overflow is handled on the next line */ \
289
- th += (c0 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFF */ \
289
+ th += (c0 < tl ); /* at most 0xFFFFFFFF */ \
290
290
c1 += th ; /* never overflows by contract (verified in the next line) */ \
291
291
VERIFY_CHECK (c1 >= th ); \
292
292
}
@@ -300,32 +300,32 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
300
300
tl = t ; \
301
301
} \
302
302
th2 = th + th ; /* at most 0xFFFFFFFE (in case th was 0x7FFFFFFF) */ \
303
- c2 += (th2 < th ) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
303
+ c2 += (th2 < th ); /* never overflows by contract (verified the next line) */ \
304
304
VERIFY_CHECK ((th2 >= th ) || (c2 != 0 )); \
305
305
tl2 = tl + tl ; /* at most 0xFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFF) */ \
306
- th2 += (tl2 < tl ) ? 1 : 0 ; /* at most 0xFFFFFFFF */ \
306
+ th2 += (tl2 < tl ); /* at most 0xFFFFFFFF */ \
307
307
c0 += tl2 ; /* overflow is handled on the next line */ \
308
- th2 += (c0 < tl2 ) ? 1 : 0 ; /* second overflow is handled on the next line */ \
308
+ th2 += (c0 < tl2 ); /* second overflow is handled on the next line */ \
309
309
c2 += (c0 < tl2 ) & (th2 == 0 ); /* never overflows by contract (verified the next line) */ \
310
310
VERIFY_CHECK ((c0 >= tl2 ) || (th2 != 0 ) || (c2 != 0 )); \
311
311
c1 += th2 ; /* overflow is handled on the next line */ \
312
- c2 += (c1 < th2 ) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
312
+ c2 += (c1 < th2 ); /* never overflows by contract (verified the next line) */ \
313
313
VERIFY_CHECK ((c1 >= th2 ) || (c2 != 0 )); \
314
314
}
315
315
316
316
/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */
317
317
#define sumadd (a ) { \
318
318
unsigned int over; \
319
319
c0 += (a); /* overflow is handled on the next line */ \
320
- over = (c0 < (a )) ? 1 : 0 ; \
320
+ over = (c0 < (a )); \
321
321
c1 += over ; /* overflow is handled on the next line */ \
322
- c2 += (c1 < over ) ? 1 : 0 ; /* never overflows by contract */ \
322
+ c2 += (c1 < over ); /* never overflows by contract */ \
323
323
}
324
324
325
325
/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */
326
326
#define sumadd_fast (a ) { \
327
327
c0 += (a); /* overflow is handled on the next line */ \
328
- c1 += (c0 < (a )) ? 1 : 0 ; /* never overflows by contract (verified the next line) */ \
328
+ c1 += (c0 < (a )); /* never overflows by contract (verified the next line) */ \
329
329
VERIFY_CHECK ((c1 != 0 ) | (c0 >= (a ))); \
330
330
VERIFY_CHECK (c2 == 0 ); \
331
331
}
0 commit comments