libspf2 icon indicating copy to clipboard operation
libspf2 copied to clipboard

patch to spf_dns_cache.c:345

Open hdatma opened this issue 4 years ago • 1 comments

spf_dns_cache.c:345:4: warning: '&&' within '||' [-Wlogical-op-parentheses]
                        && cached_rr->rr_type == ns_t_txt || cached_rr->rr_type == ns_t_spf )
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
spf_dns_cache.c:345:4: note: place parentheses around the '&&' expression to silence this warning
                        && cached_rr->rr_type == ns_t_txt || cached_rr->rr_type == ns_t_spf )
                        ^
                                                         )
--- ./src/libspf2/spf_dns_cache.c.orig  2020-12-30 23:04:14.240347609 +0100
+++ ./src/libspf2/spf_dns_cache.c       2020-12-30 23:04:14.240347609 +0100
@@ -342,7 +342,7 @@
                cached_rr->ttl = spfhook->min_ttl;
 
     if ( cached_rr->ttl < spfhook->txt_ttl
-                       && cached_rr->rr_type == ns_t_txt || cached_rr->rr_type == ns_t_spf )
+                       && ( cached_rr->rr_type == ns_t_txt || cached_rr->rr_type == ns_t_spf ))
                cached_rr->ttl = spfhook->txt_ttl;
 
     if ( cached_rr->ttl < spfhook->err_ttl

hdatma avatar Dec 30 '20 22:12 hdatma

This pull request is easy to verify and could be merged before 1.2.12

eriklax avatar Oct 04 '23 18:10 eriklax