aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/evhiperfifo.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-12-13 23:34:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-12-13 23:39:11 +0100
commitb228d2952b6762b5c9b851fba0cf391e80c6761a (patch)
treed8d52d61b047a31b1c51851f1b48c4dc9cfcd1f4 /docs/examples/evhiperfifo.c
parent5fad800efdf1cb84f863f3634b85c898fb3d0d66 (diff)
downloadgnurl-b228d2952b6762b5c9b851fba0cf391e80c6761a.tar.gz
gnurl-b228d2952b6762b5c9b851fba0cf391e80c6761a.tar.bz2
gnurl-b228d2952b6762b5c9b851fba0cf391e80c6761a.zip
checksrc: stricter no-space-before-paren enforcement
In order to make the code style more uniform everywhere
Diffstat (limited to 'docs/examples/evhiperfifo.c')
-rw-r--r--docs/examples/evhiperfifo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c
index 52f682818..efe42475a 100644
--- a/docs/examples/evhiperfifo.c
+++ b/docs/examples/evhiperfifo.c
@@ -134,7 +134,7 @@ static void mcode_or_die(const char *where, CURLMcode code)
{
if(CURLM_OK != code) {
const char *s;
- switch (code) {
+ switch(code) {
case CURLM_BAD_HANDLE:
s="CURLM_BAD_HANDLE";
break;
@@ -317,8 +317,8 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
/* CURLOPT_PROGRESSFUNCTION */
-static int prog_cb (void *p, double dltotal, double dlnow, double ult,
- double uln)
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
{
ConnInfo *conn = (ConnInfo *)p;
(void)ult;
@@ -388,7 +388,7 @@ static void fifo_cb(EV_P_ struct ev_io *w, int revents)
}
/* Create a named pipe and tell libevent to monitor it */
-static int init_fifo (GlobalInfo *g)
+static int init_fifo(GlobalInfo *g)
{
struct stat st;
static const char *fifo = "hiper.fifo";
@@ -399,18 +399,18 @@ static int init_fifo (GlobalInfo *g)
if((st.st_mode & S_IFMT) == S_IFREG) {
errno = EEXIST;
perror("lstat");
- exit (1);
+ exit(1);
}
}
unlink(fifo);
if(mkfifo (fifo, 0600) == -1) {
perror("mkfifo");
- exit (1);
+ exit(1);
}
sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
if(sockfd == -1) {
perror("open");
- exit (1);
+ exit(1);
}
g->input = fdopen(sockfd, "r");