diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-09-09 23:09:06 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-09-11 09:29:50 +0200 |
commit | 6b84438d9a9220fb75cbaae9d6fe6c3edb6d425e (patch) | |
tree | 109c29611f5bd2dbedab015b45524e8ffe6e1057 /lib/pingpong.c | |
parent | e155f38d1eaa89cc8ce2a6536b74be2954506bb0 (diff) | |
download | curl-6b84438d9a9220fb75cbaae9d6fe6c3edb6d425e.tar.gz |
code style: use spaces around equals signs
Diffstat (limited to 'lib/pingpong.c')
-rw-r--r-- | lib/pingpong.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c index 5ed79b718..c7ae8afed 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -47,10 +47,10 @@ time_t Curl_pp_state_timeout(struct pingpong *pp) { struct connectdata *conn = pp->conn; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; time_t timeout_ms; /* in milliseconds */ time_t timeout2_ms; /* in milliseconds */ - long response_time= (data->set.server_response_timeout)? + long response_time = (data->set.server_response_timeout)? data->set.server_response_timeout: pp->response_time; /* if CURLOPT_SERVER_RESPONSE_TIMEOUT is set, use that to determine @@ -85,10 +85,10 @@ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block) int rc; time_t interval_ms; time_t timeout_ms = Curl_pp_state_timeout(pp); - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; CURLcode result = CURLE_OK; - if(timeout_ms <=0) { + if(timeout_ms <= 0) { failf(data, "server response timeout"); return CURLE_OPERATION_TIMEDOUT; /* already too little time */ } @@ -270,7 +270,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, size_t *size) /* size of the response */ { ssize_t perline; /* count bytes per line */ - bool keepon=TRUE; + bool keepon = TRUE; ssize_t gotbytes; char *ptr; struct connectdata *conn = pp->conn; @@ -281,7 +281,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, *code = 0; /* 0 for errors or not done */ *size = 0; - ptr=buf + pp->nread_resp; + ptr = buf + pp->nread_resp; /* number of bytes in the current line, so far */ perline = (ssize_t)(ptr-pp->linestart_resp); @@ -351,7 +351,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, pp->nread_resp += gotbytes; for(i = 0; i < gotbytes; ptr++, i++) { perline++; - if(*ptr=='\n') { + if(*ptr == '\n') { /* a newline is CRLF in pp-talk, so the CR is ignored as the line isn't really terminated until the LF comes */ @@ -378,8 +378,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, start of the buffer and zero terminate, for old times sake */ size_t n = ptr - pp->linestart_resp; memmove(buf, pp->linestart_resp, n); - buf[n]=0; /* zero terminate */ - keepon=FALSE; + buf[n] = 0; /* zero terminate */ + keepon = FALSE; pp->linestart_resp = ptr+1; /* advance pointer */ i++; /* skip this before getting out */ @@ -387,7 +387,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, pp->nread_resp = 0; /* restart */ break; } - perline=0; /* line starts over here */ + perline = 0; /* line starts over here */ pp->linestart_resp = ptr+1; } } @@ -490,7 +490,7 @@ CURLcode Curl_pp_flushsend(struct pingpong *pp) } else { free(pp->sendthis); - pp->sendthis=NULL; + pp->sendthis = NULL; pp->sendleft = pp->sendsize = 0; pp->response = Curl_tvnow(); } |