Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch to spf_dns_cache.c:345 #31

Open
hdatma opened this issue Dec 30, 2020 · 1 comment · May be fixed by #37
Open

patch to spf_dns_cache.c:345 #31

hdatma opened this issue Dec 30, 2020 · 1 comment · May be fixed by #37

Comments

@hdatma
Copy link

hdatma commented Dec 30, 2020

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 hdatma changed the title patch patch to spf_dns_cache.c:345 Dec 30, 2020
nomis added a commit to nomis/libspf2 that referenced this issue Aug 13, 2021
@nomis nomis linked a pull request Aug 13, 2021 that will close this issue
@eriklax
Copy link

eriklax commented Oct 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants