Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e6d19c

Browse files
committed
Fix a potential binarith->boolean result truncation in raftable.
1 parent3b08a46 commit3e6d19c

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
structpollfdpfd= {sock,POLLOUT,0};
8787
intr=poll(&pfd,1,timeout_ms);
8888
if (r!=1)return false;
89-
returnpfd.revents&POLLOUT;
89+
return(pfd.revents&POLLOUT)!=0;
9090
}
9191

9292
staticboolpoll_until_readable(intsock,inttimeout_ms)
9393
{
9494
structpollfdpfd= {sock,POLLIN,0};
9595
intr=poll(&pfd,1,timeout_ms);
9696
if (r!=1)return false;
97-
returnpfd.revents&POLLIN;
97+
return(pfd.revents&POLLIN)!=0;
9898
}
9999

100100
staticlongmsec(TimestampTztimer)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp