@@ -261,7 +261,7 @@ int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pu
261261    ARG_CHECK (pubkey != NULL );
262262    memset (pubkey, 0 , sizeof (*pubkey));
263263    ARG_CHECK (input != NULL );
264-     if  (! secp256k1_eckey_pubkey_parse (&Q, input, inputlen)) {
264+     if  (secp256k1_eckey_pubkey_parse (&Q, input, inputlen) ==  0 ) {
265265        return  0 ;
266266    }
267267    secp256k1_pubkey_save (pubkey, &Q);
@@ -347,9 +347,9 @@ int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context* ctx, secp25
347347    ARG_CHECK (input64 != NULL );
348348
349349    secp256k1_scalar_set_b32 (&r, &input64[0 ], &overflow);
350-     ret &= ! overflow;
350+     ret &= overflow ==  0 ;
351351    secp256k1_scalar_set_b32 (&s, &input64[32 ], &overflow);
352-     ret &= ! overflow;
352+     ret &= overflow ==  0 ;
353353    if  (ret) {
354354        secp256k1_ecdsa_signature_save (sig, &r, &s);
355355    } else  {
@@ -414,9 +414,9 @@ int secp256k1_ecdsa_verify(const secp256k1_context* ctx, const secp256k1_ecdsa_s
414414
415415    secp256k1_scalar_set_b32 (&m, msg32, NULL );
416416    secp256k1_ecdsa_signature_load (ctx, &r, &s, sig);
417-     return  (! secp256k1_scalar_is_high (&s) &&
418-             secp256k1_pubkey_load (ctx, &q, pubkey) &&
419-             secp256k1_ecdsa_sig_verify (&ctx->ecmult_ctx , &r, &s, &q, &m));
417+     return  (secp256k1_scalar_is_high (&s) ==  0  &&
418+             secp256k1_pubkey_load (ctx, &q, pubkey) !=  0   &&
419+             secp256k1_ecdsa_sig_verify (&ctx->ecmult_ctx , &r, &s, &q, &m) !=  0 );
420420}
421421
422422static  SECP256K1_INLINE void  buffer_append (unsigned  char  *buf, unsigned  int  *offset, const  void  *data, unsigned  int  len) {
@@ -473,18 +473,18 @@ int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature
473473
474474    secp256k1_scalar_set_b32 (&sec, seckey, &overflow);
475475    /*  Fail if the secret key is invalid. */ 
476-     if  (! overflow && ! secp256k1_scalar_is_zero (&sec)) {
476+     if  (overflow ==  0   && secp256k1_scalar_is_zero (&sec) ==  0 ) {
477477        unsigned  char  nonce32[32 ];
478478        unsigned  int  count = 0 ;
479479        secp256k1_scalar_set_b32 (&msg, msg32, NULL );
480480        while  (1 ) {
481481            ret = noncefp (nonce32, msg32, seckey, NULL , (void *)noncedata, count);
482-             if  (! ret) {
482+             if  (ret ==  0 ) {
483483                break ;
484484            }
485485            secp256k1_scalar_set_b32 (&non, nonce32, &overflow);
486-             if  (! overflow && ! secp256k1_scalar_is_zero (&non)) {
487-                 if  (secp256k1_ecdsa_sig_sign (&ctx->ecmult_gen_ctx , &r, &s, &sec, &msg, &non, NULL )) {
486+             if  (overflow ==  0   && secp256k1_scalar_is_zero (&non) ==  0 ) {
487+                 if  (secp256k1_ecdsa_sig_sign (&ctx->ecmult_gen_ctx , &r, &s, &sec, &msg, &non, NULL ) !=  0 ) {
488488                    break ;
489489                }
490490            }
@@ -511,7 +511,7 @@ int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char
511511    ARG_CHECK (seckey != NULL );
512512
513513    secp256k1_scalar_set_b32 (&sec, seckey, &overflow);
514-     ret = ! overflow && ! secp256k1_scalar_is_zero (&sec);
514+     ret = overflow ==  0   && secp256k1_scalar_is_zero (&sec) ==  0 ;
515515    secp256k1_scalar_clear (&sec);
516516    return  ret;
517517}
@@ -529,8 +529,8 @@ int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *p
529529    ARG_CHECK (seckey != NULL );
530530
531531    secp256k1_scalar_set_b32 (&sec, seckey, &overflow);
532-     ret = ! overflow && ! secp256k1_scalar_is_zero (&sec);
533-     if  (ret) {
532+     ret = overflow ==  0   && secp256k1_scalar_is_zero (&sec) ==  0 ;
533+     if  (ret !=  0 ) {
534534        secp256k1_ecmult_gen (&ctx->ecmult_gen_ctx , &pj, &sec);
535535        secp256k1_ge_set_gej (&p, &pj);
536536        secp256k1_pubkey_save (pubkey, &p);
@@ -579,9 +579,9 @@ int secp256k1_ec_privkey_tweak_add(const secp256k1_context* ctx, unsigned char *
579579    secp256k1_scalar_set_b32 (&term, tweak, &overflow);
580580    secp256k1_scalar_set_b32 (&sec, seckey, NULL );
581581
582-     ret = ! overflow && secp256k1_eckey_privkey_tweak_add (&sec, &term);
582+     ret = overflow ==  0   && secp256k1_eckey_privkey_tweak_add (&sec, &term) !=  0 ;
583583    memset (seckey, 0 , 32 );
584-     if  (ret) {
584+     if  (ret !=  0 ) {
585585        secp256k1_scalar_get_b32 (seckey, &sec);
586586    }
587587
@@ -601,9 +601,9 @@ int secp256k1_ec_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey
601601    ARG_CHECK (tweak != NULL );
602602
603603    secp256k1_scalar_set_b32 (&term, tweak, &overflow);
604-     ret = ! overflow && secp256k1_pubkey_load (ctx, &p, pubkey);
604+     ret = overflow ==  0   && secp256k1_pubkey_load (ctx, &p, pubkey) !=  0 ;
605605    memset (pubkey, 0 , sizeof (*pubkey));
606-     if  (ret) {
606+     if  (ret !=  0 ) {
607607        if  (secp256k1_eckey_pubkey_tweak_add (&ctx->ecmult_ctx , &p, &term)) {
608608            secp256k1_pubkey_save (pubkey, &p);
609609        } else  {
@@ -625,9 +625,9 @@ int secp256k1_ec_privkey_tweak_mul(const secp256k1_context* ctx, unsigned char *
625625
626626    secp256k1_scalar_set_b32 (&factor, tweak, &overflow);
627627    secp256k1_scalar_set_b32 (&sec, seckey, NULL );
628-     ret = ! overflow && secp256k1_eckey_privkey_tweak_mul (&sec, &factor);
628+     ret = overflow ==  0   && secp256k1_eckey_privkey_tweak_mul (&sec, &factor) !=  0 ;
629629    memset (seckey, 0 , 32 );
630-     if  (ret) {
630+     if  (ret !=  0 ) {
631631        secp256k1_scalar_get_b32 (seckey, &sec);
632632    }
633633
@@ -647,9 +647,9 @@ int secp256k1_ec_pubkey_tweak_mul(const secp256k1_context* ctx, secp256k1_pubkey
647647    ARG_CHECK (tweak != NULL );
648648
649649    secp256k1_scalar_set_b32 (&factor, tweak, &overflow);
650-     ret = ! overflow && secp256k1_pubkey_load (ctx, &p, pubkey);
650+     ret = overflow ==  0   && secp256k1_pubkey_load (ctx, &p, pubkey) !=  0 ;
651651    memset (pubkey, 0 , sizeof (*pubkey));
652-     if  (ret) {
652+     if  (ret !=  0 ) {
653653        if  (secp256k1_eckey_pubkey_tweak_mul (&ctx->ecmult_ctx , &p, &factor)) {
654654            secp256k1_pubkey_save (pubkey, &p);
655655        } else  {
0 commit comments