summaryrefslogtreecommitdiff
path: root/lib/escape.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-05-23 16:55:09 +0200
committerYang Tse <yangsita@gmail.com>2011-05-23 16:55:09 +0200
commit30c9799f72f3275f806a296e1100ad04c942706c (patch)
treed1903198168db0506d4bf08f2e7ea8ff54115382 /lib/escape.c
parentbed6b89a2fb4f8a1279adc6a8f823b3e2d8a726f (diff)
downloadcurl-30c9799f72f3275f806a296e1100ad04c942706c.tar.gz
compiler warning: fix
Fix compiler warning: expression has no effect
Diffstat (limited to 'lib/escape.c')
-rw-r--r--lib/escape.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/escape.c b/lib/escape.c
index 50d310a1a..5500a92bf 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -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;