mirror of
https://github.com/curl/curl.git
synced 2026-08-09 05:54:22 +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
|
|
@ -182,8 +182,8 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
|
|||
int fd = g_io_channel_unix_get_fd(ch);
|
||||
|
||||
int action =
|
||||
(condition & G_IO_IN ? CURL_CSELECT_IN : 0) |
|
||||
(condition & G_IO_OUT ? CURL_CSELECT_OUT : 0);
|
||||
((condition & G_IO_IN) ? CURL_CSELECT_IN : 0) |
|
||||
((condition & G_IO_OUT) ? 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);
|
||||
|
|
@ -218,7 +218,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
|
|||
GlobalInfo *g)
|
||||
{
|
||||
GIOCondition kind =
|
||||
(act&CURL_POLL_IN?G_IO_IN:0)|(act&CURL_POLL_OUT?G_IO_OUT:0);
|
||||
((act & CURL_POLL_IN) ? G_IO_IN : 0) |
|
||||
((act & CURL_POLL_OUT) ? G_IO_OUT : 0);
|
||||
|
||||
f->sockfd = s;
|
||||
f->action = act;
|
||||
|
|
@ -255,8 +256,8 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||
else {
|
||||
if(!fdp) {
|
||||
MSG_OUT("Adding data: %s%s\n",
|
||||
what&CURL_POLL_IN?"READ":"",
|
||||
what&CURL_POLL_OUT?"WRITE":"");
|
||||
(what & CURL_POLL_IN) ? "READ" : "",
|
||||
(what & CURL_POLL_OUT) ? "WRITE" : "");
|
||||
addsock(s, e, what, g);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue