Commit dc4b750c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't reinvent the wheel^W^WANSI C

(or yet another "why make it complex when it can be simple")
parent 08c88156
......@@ -2853,18 +2853,6 @@ static void uri_decode_url_encoded( char *psz )
free( dup );
}
static int char_in_str( char c, const char *str )
{
while( *str )
{
if( c == *str )
return 1;
str++;
}
return 0;
}
static void uri_encode( const char *from, char *to, size_t to_len )
{
static const char hex[] = "0123456789abcdef";
......@@ -2875,7 +2863,7 @@ static void uri_encode( const char *from, char *to, size_t to_len )
{
*to++ = '+';
}
else if( isalnum( *from ) || char_in_str( *from, "$-_.+!*'(),/" ) )
else if( isalnum( *from ) || strchr( "$-_.+!*'(),/", *from ) )
{
*to++ = *from;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment