compiler warning: fix

Fix compiler warning: expression has no effect
This commit is contained in:
Yang Tse
2011-05-23 16:55:09 +02:00
parent bed6b89a2f
commit 30c9799f72
2 changed files with 13 additions and 5 deletions

View File

@@ -89,6 +89,7 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
size_t newlen = alloc;
int strindex=0;
size_t length;
CURLcode res;
ns = malloc(alloc);
if(!ns)
@@ -116,7 +117,8 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
}
}
if(Curl_convert_to_network(handle, &in, 1)) {
res = Curl_convert_to_network(handle, &in, 1);
if(res) {
/* Curl_convert_to_network calls failf if unsuccessful */
free(ns);
return NULL;
@@ -146,6 +148,7 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
unsigned char in;
int strindex=0;
unsigned long hex;
CURLcode res;
if(!ns)
return NULL;
@@ -164,7 +167,8 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
if(Curl_convert_from_network(handle, &in, 1)) {
res = Curl_convert_from_network(handle, &in, 1);
if(res) {
/* Curl_convert_from_network calls failf if unsuccessful */
free(ns);
return NULL;