@@ -192,9 +192,9 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
192
192
tl = t ; \
193
193
} \
194
194
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 */ \
196
196
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) */ \
198
198
VERIFY_CHECK ((c1 >= th ) || (c2 != 0 )); \
199
199
}
200
200
@@ -207,7 +207,7 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
207
207
tl = t ; \
208
208
} \
209
209
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 */ \
211
211
c1 += th ; /* never overflows by contract (verified in the next line) */ \
212
212
VERIFY_CHECK (c1 >= th ); \
213
213
}
@@ -221,32 +221,32 @@ static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
221
221
tl = t ; \
222
222
} \
223
223
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) */ \
225
225
VERIFY_CHECK ((th2 >= th ) || (c2 != 0 )); \
226
226
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 */ \
228
228
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 */ \
230
230
c2 += (c0 < tl2 ) & (th2 == 0 ); /* never overflows by contract (verified the next line) */ \
231
231
VERIFY_CHECK ((c0 >= tl2 ) || (th2 != 0 ) || (c2 != 0 )); \
232
232
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) */ \
234
234
VERIFY_CHECK ((c1 >= th2 ) || (c2 != 0 )); \
235
235
}
236
236
237
237
/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */
238
238
#define sumadd (a ) { \
239
239
unsigned int over; \
240
240
c0 += (a); /* overflow is handled on the next line */ \
241
- over = (c0 < (a )) ? 1 : 0 ; \
241
+ over = (c0 < (a )); \
242
242
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 */ \
244
244
}
245
245
246
246
/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */
247
247
#define sumadd_fast (a ) { \
248
248
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) */ \
250
250
VERIFY_CHECK ((c1 != 0 ) | (c0 >= (a ))); \
251
251
VERIFY_CHECK (c2 == 0 ); \
252
252
}
0 commit comments