Use the explicit NULL macro for pointer comparisons.
This makes it more clear that a null check is intended. Avoiding the use of a pointer as a test condition alse increases the type-safety of the comparisons. (This is also MISRA C 2012 rules 14.4 and 11.9)
This commit is contained in:
@@ -73,7 +73,7 @@ static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, u
|
||||
n = *nonce;
|
||||
|
||||
secp256k1_ecmult_gen(ctx, &Rj, &n);
|
||||
if (pubnonce) {
|
||||
if (pubnonce != NULL) {
|
||||
secp256k1_gej_add_ge(&Rj, &Rj, pubnonce);
|
||||
}
|
||||
secp256k1_ge_set_gej(&Ra, &Rj);
|
||||
|
||||
Reference in New Issue
Block a user