summaryrefslogtreecommitdiff
path: root/docs/examples/ghiper.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-06-07 16:10:38 +0000
committerng0 <ng0@n0.is>2019-06-07 16:10:38 +0000
commit61c8b4c19e66a9a70ebd5e2ade322859ae038d35 (patch)
tree586e98e8a1a8af9cf9388f4f6dd768091dfa3965 /docs/examples/ghiper.c
parent7959939f112e7a86a0df994e19f02f5c198eb28a (diff)
parent69248b58f649e35b09a126c12781353e3471f5c6 (diff)
downloadgnurl-61c8b4c19e66a9a70ebd5e2ade322859ae038d35.tar.gz
gnurl-61c8b4c19e66a9a70ebd5e2ade322859ae038d35.tar.bz2
gnurl-61c8b4c19e66a9a70ebd5e2ade322859ae038d35.zip
Merge tag 'curl-7_65_1' of https://github.com/curl/curl
7.65.1
Diffstat (limited to 'docs/examples/ghiper.c')
-rw-r--r--docs/examples/ghiper.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index 9b7a88892..a157094c7 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -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 {