summaryrefslogtreecommitdiff
path: root/lib/dict.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-04-16 23:43:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-04-16 23:43:04 +0200
commitc0111460b0689d74731cc56ff019cc869a0d16a8 (patch)
tree037a368cf8e5f50868320fa214d9915d7df4b924 /lib/dict.c
parent93981bb9b5026f88ed4dec5d790bb7c84265210a (diff)
downloadcurl-c0111460b0689d74731cc56ff019cc869a0d16a8.tar.gz
Curl_setup_transfer: no longer returns anything
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
Diffstat (limited to 'lib/dict.c')
-rw-r--r--lib/dict.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/lib/dict.c b/lib/dict.c
index 1deab76ec..d86923a9f 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -217,13 +217,12 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
free(eword);
- if(result)
+ if(result) {
failf(data, "Failed sending DICT request");
- else
- result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
- -1, NULL); /* no upload */
- if(result)
return result;
+ }
+ Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
+ -1, NULL); /* no upload */
}
else if(Curl_raw_nequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
Curl_raw_nequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
@@ -265,15 +264,12 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
free(eword);
- if(result)
+ if(result) {
failf(data, "Failed sending DICT request");
- else
- result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
- -1, NULL); /* no upload */
-
- if(result)
return result;
-
+ }
+ Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
+ -1, NULL); /* no upload */
}
else {
@@ -290,13 +286,12 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n"
"%s\r\n"
"QUIT\r\n", ppath);
- if(result)
+ if(result) {
failf(data, "Failed sending DICT request");
- else
- result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
- -1, NULL);
- if(result)
return result;
+ }
+
+ Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount, -1, NULL);
}
}