diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-04-20 15:17:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-04-27 09:09:35 +0200 |
commit | b903186fa0189ff241d756d25d07fdfe9885ae49 (patch) | |
tree | bd942ac8753469172661b0d30153986378337fdf /lib/gopher.c | |
parent | 592eda8e3feb1bf8d0f85c2baa485323b315f9d9 (diff) | |
download | curl-b903186fa0189ff241d756d25d07fdfe9885ae49.tar.gz |
source cleanup: unify look, style and indent levels
By the use of a the new lib/checksrc.pl script that checks that our
basic source style rules are followed.
Diffstat (limited to 'lib/gopher.c')
-rw-r--r-- | lib/gopher.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gopher.c b/lib/gopher.c index 6718bafb1..3ee8261b6 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -132,7 +132,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) *done = TRUE; /* unconditionally */ /* Create selector. Degenerate cases: / and /1 => convert to "" */ - if (strlen(path) <= 2) + if(strlen(path) <= 2) sel = (char *)""; else { char *newp; @@ -151,7 +151,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) /* ... and finally unescape */ sel = curl_easy_unescape(data, newp, 0, &len); - if (!sel) + if(!sel) return CURLE_OUT_OF_MEMORY; sel_org = sel; } @@ -162,7 +162,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) for(;;) { result = Curl_write(conn, sockfd, sel, k, &amount); - if (CURLE_OK == result) { /* Which may not have written it all! */ + if(CURLE_OK == result) { /* Which may not have written it all! */ result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount); if(result) { Curl_safefree(sel_org); @@ -170,7 +170,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) } k -= amount; sel += amount; - if (k < 1) + if(k < 1) break; /* but it did write it all */ } else { @@ -195,7 +195,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) /* We can use Curl_sendf to send the terminal \r\n relatively safely and save allocing another string/doing another _write loop. */ result = Curl_sendf(sockfd, conn, "\r\n"); - if (result != CURLE_OK) { + if(result != CURLE_OK) { failf(data, "Failed sending Gopher request"); return result; } |