bugfix: "ARG_CHECK(ctx != NULL)" makes no sense

Move all context checks to VERIFY_CHECK and be sure they come before all
ARG_CHECKs.
This commit is contained in:
Cory Fields
2015-09-01 14:22:32 -04:00
parent 5eb435694e
commit b183b41122
3 changed files with 17 additions and 17 deletions

View File

@@ -90,7 +90,7 @@ int secp256k1_ecdsa_sign_recoverable(const secp256k1_context_t* ctx, const unsig
int ret = 0;
int overflow = 0;
unsigned int count = 0;
ARG_CHECK(ctx != NULL);
VERIFY_CHECK(ctx != NULL);
ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
ARG_CHECK(msg32 != NULL);
ARG_CHECK(signature != NULL);
@@ -135,7 +135,7 @@ int secp256k1_ecdsa_recover(const secp256k1_context_t* ctx, const unsigned char
secp256k1_scalar_t r, s;
secp256k1_scalar_t m;
int recid;
ARG_CHECK(ctx != NULL);
VERIFY_CHECK(ctx != NULL);
ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx));
ARG_CHECK(msg32 != NULL);
ARG_CHECK(signature != NULL);