Content-Length: 274091 | pFad | http://github.com/postgrespro/postgres_cluster/commit/3e6d19ca691371232347f7205c1e863d42b6d71a

AD Fix a potential binarith->boolean result truncation in raftable. · postgrespro/postgres_cluster@3e6d19c · GitHub
Skip to content

Commit 3e6d19c

Browse files
committed
Fix a potential binarith->boolean result truncation in raftable.
1 parent 3b08a46 commit 3e6d19c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/raftable/raftable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ static bool poll_until_writable(int sock, int timeout_ms)
8686
struct pollfd pfd = {sock, POLLOUT, 0};
8787
int r = poll(&pfd, 1, timeout_ms);
8888
if (r != 1) return false;
89-
return pfd.revents & POLLOUT;
89+
return (pfd.revents & POLLOUT) != 0;
9090
}
9191

9292
static bool poll_until_readable(int sock, int timeout_ms)
9393
{
9494
struct pollfd pfd = {sock, POLLIN, 0};
9595
int r = poll(&pfd, 1, timeout_ms);
9696
if (r != 1) return false;
97-
return pfd.revents & POLLIN;
97+
return (pfd.revents & POLLIN) != 0;
9898
}
9999

100100
static long msec(TimestampTz timer)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/3e6d19ca691371232347f7205c1e863d42b6d71a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy