* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, 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
size_t newlen = alloc;
size_t strindex=0;
size_t length;
- CURLcode res;
+ CURLcode result;
ns = malloc(alloc);
if(!ns)
}
}
- res = Curl_convert_to_network(handle, &in, 1);
- if(res) {
+ result = Curl_convert_to_network(handle, &in, 1);
+ if(result) {
/* Curl_convert_to_network calls failf if unsuccessful */
free(ns);
return NULL;
unsigned char in;
size_t strindex=0;
unsigned long hex;
- CURLcode res;
+ CURLcode result;
if(!ns)
return CURLE_OUT_OF_MEMORY;
in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
- res = Curl_convert_from_network(data, &in, 1);
- if(res) {
+ result = Curl_convert_from_network(data, &in, 1);
+ if(result) {
/* Curl_convert_from_network calls failf if unsuccessful */
free(ns);
- return res;
+ return result;
}
string+=2;
alloc-=2;
}
+
if(reject_ctrl && (in < 0x20)) {
free(ns);
return CURLE_URL_MALFORMAT;
/* store output size */
*olen = strindex;
- if(ostring)
- /* store output string */
- *ostring = ns;
+ /* store output string */
+ *ostring = ns;
return CURLE_OK;
}