File: 16_Fix_precedence_related_to_poll.patch

package info (click to toggle)
libetpan 1.9.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,448 kB
  • sloc: ansic: 106,954; sh: 4,179; makefile: 646; cpp: 46
file content (44 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Subject: FIX: operator precedence related to poll

Fixes the following warnings:

```
connect.c:162:19: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
mailstream_ssl.c:368:32: warning: self-comparison always evaluates to false [-Wtautological-compare]
mailstream_ssl.c:368:32: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
```

Last-Update: 2024-05-28
Origin: https://github.com/mtasaka/libetpan/commit/25288ce11c6e9a4b777739acae0d5e74f91983be
Forwarded: https://github.com/dinhvh/libetpan/pull/447/
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2283446
Applied-Upstream: no

---
 src/data-types/connect.c        | 2 +-
 src/data-types/mailstream_ssl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/src/data-types/connect.c
+++ b/src/data-types/connect.c
@@ -159,7 +159,7 @@
     return -1;
   }
   
-  if (pfd.revents & POLLOUT != POLLOUT) {
+  if ((pfd.revents & POLLOUT) != POLLOUT) {
     return -1;
   }
 #endif
--- a/src/data-types/mailstream_ssl.c
+++ b/src/data-types/mailstream_ssl.c
@@ -365,7 +365,7 @@
     return -1;
   }
 
-  if (pfd.revents & pfd.events != pfd.events) {
+  if ((pfd.revents & pfd.events) != pfd.events) {
     return -1;
   }
 #endif