mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:43:33 +03:00
examples: fix "clarify calculation precedence" warnings
Closes https://github.com/curl/curl/pull/3919
This commit is contained in:
parent
acb097ca7f
commit
159ea554af
4 changed files with 18 additions and 15 deletions
|
|
@ -202,8 +202,8 @@ static void event_cb(int fd, short kind, void *userp)
|
|||
CURLMcode rc;
|
||||
|
||||
int action =
|
||||
(kind & EV_READ ? CURL_CSELECT_IN : 0) |
|
||||
(kind & EV_WRITE ? CURL_CSELECT_OUT : 0);
|
||||
((kind & EV_READ) ? CURL_CSELECT_IN : 0) |
|
||||
((kind & EV_WRITE) ? CURL_CSELECT_OUT : 0);
|
||||
|
||||
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||
|
|
@ -249,7 +249,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
|
|||
GlobalInfo *g)
|
||||
{
|
||||
int kind =
|
||||
(act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST;
|
||||
((act & CURL_POLL_IN) ? EV_READ : 0) |
|
||||
((act & CURL_POLL_OUT) ? EV_WRITE : 0) | EV_PERSIST;
|
||||
|
||||
f->sockfd = s;
|
||||
f->action = act;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue