[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 22/178: examples/hiperfifo: checksrc compliance
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 22/178: examples/hiperfifo: checksrc compliance |
Date: |
Wed, 23 May 2018 12:24:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 712c916d94d92ec7cc52b938f737d96060484f61
Author: Jay Satiro <address@hidden>
AuthorDate: Tue Mar 20 03:12:35 2018 -0400
examples/hiperfifo: checksrc compliance
---
docs/examples/hiperfifo.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c
index 3ca1ed238..7794283c6 100644
--- a/docs/examples/hiperfifo.c
+++ b/docs/examples/hiperfifo.c
@@ -116,7 +116,7 @@ typedef struct _SockInfo
} SockInfo;
#define __case(code) \
- case code: s = __STRING(code)
+ case code: s = __STRING(code)
/* Die if we get a bad CURLMcode somewhere */
static void mcode_or_die(const char *where, CURLMcode code)
@@ -161,11 +161,12 @@ static int multi_timer_cb(CURLM *multi _Unused, long
timeout_ms, GlobalInfo *g)
* for all other values of timeout_ms, this should set or *update*
* the timer to the new value
*/
- if (timeout_ms == 0) {
+ if(timeout_ms == 0) {
rc = curl_multi_socket_action(g->multi,
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
mcode_or_die("multi_timer_cb: curl_multi_socket_action", rc);
- } else if (timeout_ms == -1)
+ }
+ else if(timeout_ms == -1)
evtimer_del(&g->timer_event);
else
evtimer_add(&g->timer_event, &timeout);
@@ -197,7 +198,7 @@ static void check_multi_info(GlobalInfo *g)
free(conn);
}
}
- if (g->still_running == 0 && g->stopped)
+ if(g->still_running == 0 && g->stopped)
event_base_loopbreak(g->evbase);
}
@@ -310,7 +311,8 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void
*cbp, void *sockp)
/* CURLOPT_WRITEFUNCTION */
-static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb, void
*data)
+static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb,
+ void *data)
{
size_t realsize = size * nmemb;
ConnInfo *conn _Unused = (ConnInfo*) data;
@@ -379,11 +381,12 @@ static void fifo_cb(int fd _Unused, short event _Unused,
void *arg)
rv = fscanf(g->input, "%1023s%n", s, &n);
s[n]='\0';
if(n && s[0]) {
- if (!strcmp(s, "stop")) {
+ if(!strcmp(s, "stop")) {
g->stopped = 1;
- if (g->still_running == 0)
+ if(g->still_running == 0)
event_base_loopbreak(g->evbase);
- } else
+ }
+ else
new_conn(s, arg); /* if we read a URL, go get it! */
}
else
@@ -419,7 +422,8 @@ static int init_fifo(GlobalInfo *g)
g->input = fdopen(sockfd, "r");
fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
- event_assign(&g->fifo_event, g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb,
g);
+ event_assign(&g->fifo_event, g->evbase, sockfd, EV_READ|EV_PERSIST,
+ fifo_cb, g);
event_add(&g->fifo_event, NULL);
return (0);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 32/178: timeval: remove compilation warning by casting (#2417), (continued)
- [GNUnet-SVN] [gnurl] 32/178: timeval: remove compilation warning by casting (#2417), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 23/178: vauth/ntlm.h: fix the #ifdef header guard, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 08/178: cleanup: misc typos in strings and comments, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 29/178: CURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 38/178: runtests.pl: fix warning 'use of uninitialized value', gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 24/178: lib/curl_path.h: add #ifdef header guard, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 33/178: cmake: avoid warn-as-error during config checks (#2411), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 25/178: vauth/cleartext: fix integer overflow check, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 26/178: CURLINFO_COOKIELIST.3: made the example not leak memory, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 34/178: travis-ci: enable -Werror for CMake builds (#2418), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 22/178: examples/hiperfifo: checksrc compliance,
gnunet <=
- [GNUnet-SVN] [gnurl] 20/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 37/178: gitignore: ignore more generated files, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 35/178: openldap: fix for NULL return from ldap_get_attribute_ber(), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 10/178: examples/hiperfifo.c: improved, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 14/178: CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 12/178: multi: improved pending transfers handling => improved performance, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 39/178: travis: enable apt retry on fail, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 36/178: threaded resolver: track resolver time and set suitable timeout values, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 30/178: CI: add lgtm.yml for tweaking lgtm.com analysis, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 40/178: TODO: connection cache sharing is now supporte, gnunet, 2018/05/23