[exim-cvs] DNSSEC: fix clang warning re && in || precedence

Etusivu
Poista viesti
Vastaa
Lähettäjä: Exim Git Commits Mailing List
Päiväys:  
Vastaanottaja: exim-cvs
Aihe: [exim-cvs] DNSSEC: fix clang warning re && in || precedence
Gitweb: http://git.exim.org/exim.git/commitdiff/9852336a0e497e2f2ef5e12919ac602defef957b
Commit:     9852336a0e497e2f2ef5e12919ac602defef957b
Parent:     2fc44bd527012cc3075667f8f50243ee01cdcd27
Author:     Phil Pennock <pdp@???>
AuthorDate: Mon Jul 14 03:13:13 2014 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Mon Jul 14 03:13:13 2014 -0400


    DNSSEC: fix clang warning re && in || precedence


    I looked and AFAICT the compiler guidance gives the correct logical
    binding for the code intention.


    ```
    dnsdb.c:362:32: warning: '&&' within '||' [-Wlogical-op-parentheses]
           || dnssec_mode == DEFER && !dns_is_secure(&dnsa)
           ~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    dnsdb.c:362:32: note: place parentheses around the '&&' expression to silence this warning
           || dnssec_mode == DEFER && !dns_is_secure(&dnsa)
                                   ^
              (                                            )
    ```
---
 src/src/lookups/dnsdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c
index 6b4d55c..fde98b9 100644
--- a/src/src/lookups/dnsdb.c
+++ b/src/src/lookups/dnsdb.c
@@ -359,7 +359,7 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))

     if (rc == DNS_NOMATCH || rc == DNS_NODATA) continue;
     if (  rc != DNS_SUCCEED
-       || dnssec_mode == DEFER && !dns_is_secure(&dnsa)
+       || (dnssec_mode == DEFER && !dns_is_secure(&dnsa))
        )
       {
       if (defer_mode == DEFER)