aboutsummaryrefslogtreecommitdiff
path: root/lib/escape.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/escape.c')
-rw-r--r--lib/escape.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/escape.c b/lib/escape.c
index c569902f6..9552b0f31 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -116,10 +116,6 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
return ns;
}
-#define ishex(in) ((in >= 'a' && in <= 'f') || \
- (in >= 'A' && in <= 'F') || \
- (in >= '0' && in <= '9'))
-
char *curl_easy_unescape(CURL *handle, const char *string, int length,
int *olen)
{
@@ -138,7 +134,7 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
while(--alloc > 0) {
in = *string;
- if(('%' == in) && ishex(string[1]) && ishex(string[2])) {
+ if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
/* this is two hexadecimal digits following a '%' */
char hexstr[3];
char *ptr;