Skip to content

Commit 0a3ebd7

Browse files
committed
Remove usage of CHECK from non-test file
Currently CHECK is used only in test and bench mark files except for one usage in `ecmult_impl.h`. We would like to move the definition of CHECK out of `util.h` so that `util.h` no longer has a hard dependency on `stdio.h`. Done as part of an effort to allow secp256k1 to be compiled to WASM as part of `rust-secp256k1`.
1 parent a43e982 commit 0a3ebd7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ecmult_impl.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@ static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a,
199199

200200
bit += now;
201201
}
202-
#ifdef VERIFY
203-
CHECK(carry == 0);
202+
203+
VERIFY_CHECK(carry == 0);
204204
while (bit < 256) {
205-
CHECK(secp256k1_scalar_get_bits(&s, bit++, 1) == 0);
205+
VERIFY_CHECK(secp256k1_scalar_get_bits(&s, bit, 1) == 0);
206+
bit++;
206207
}
207-
#endif
208+
208209
return last_set_bit + 1;
209210
}
210211

0 commit comments

Comments
 (0)