summaryrefslogtreecommitdiffstats
path: root/lib/dict.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2017-10-04 05:52:15 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-10 15:15:03 (GMT)
commitde7c21d677db1ddaeece03c19e13e448f4031511 (patch)
treef812bbd3771bd01de9f7cd91a557766605f6ed2c /lib/dict.c
parent06d6d6c4aee149cd6560b919ef6935ef0867d921 (diff)
downloadCMake-de7c21d677db1ddaeece03c19e13e448f4031511.zip
CMake-de7c21d677db1ddaeece03c19e13e448f4031511.tar.gz
CMake-de7c21d677db1ddaeece03c19e13e448f4031511.tar.bz2
curl 2017-10-04 (3ea76790)
Code extracted from: https://github.com/curl/curl.git at commit 3ea76790571c1f7cf1bed34fabffd3cc20ad3dd3 (curl-7_56_0).
Diffstat (limited to 'lib/dict.c')
-rw-r--r--lib/dict.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/dict.c b/lib/dict.c
index 451ec38..4fc8552 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, 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
@@ -85,6 +85,7 @@ const struct Curl_handler Curl_handler_dict = {
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
ZERO_NULL, /* readwrite */
+ ZERO_NULL, /* connection_check */
PORT_DICT, /* defport */
CURLPROTO_DICT, /* protocol */
PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */
@@ -97,7 +98,7 @@ static char *unescape_word(struct Curl_easy *data, const char *inputbuff)
char *ptr;
size_t len;
char ch;
- int olen=0;
+ int olen = 0;
CURLcode result = Curl_urldecode(data, inputbuff, 0, &newp, &len, FALSE);
if(!newp || result)
@@ -116,7 +117,7 @@ static char *unescape_word(struct Curl_easy *data, const char *inputbuff)
}
dictp[olen++] = ch;
}
- dictp[olen]=0;
+ dictp[olen] = 0;
}
free(newp);
return dictp;
@@ -131,8 +132,8 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
char *strategy = NULL;
char *nthdef = NULL; /* This is not part of the protocol, but required
by RFC 2229 */
- CURLcode result=CURLE_OK;
- struct Curl_easy *data=conn->data;
+ CURLcode result = CURLE_OK;
+ struct Curl_easy *data = conn->data;
curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
char *path = data->state.path;
@@ -167,7 +168,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
if((word == NULL) || (*word == (char)0)) {
infof(data, "lookup word is missing\n");
- word=(char *)"default";
+ word = (char *)"default";
}
if((database == NULL) || (*database == (char)0)) {
database = (char *)"!";
@@ -221,7 +222,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
if((word == NULL) || (*word == (char)0)) {
infof(data, "lookup word is missing\n");
- word=(char *)"default";
+ word = (char *)"default";
}
if((database == NULL) || (*database == (char)0)) {
database = (char *)"!";