mirror of
https://github.com/transmission/transmission
synced 2025-03-06 11:38:21 +00:00
(trunk libT) very minor tweak: tr_httpIsValidURL() should return a tr_bool, not an int.
This commit is contained in:
parent
bf1a544939
commit
306d26a97c
2 changed files with 4 additions and 4 deletions
|
@ -923,10 +923,10 @@ tr_sha1_to_hex( char * out,
|
|||
****
|
||||
***/
|
||||
|
||||
int
|
||||
tr_bool
|
||||
tr_httpIsValidURL( const char * url )
|
||||
{
|
||||
const char * c;
|
||||
const char * c;
|
||||
static const char * rfc2396_valid_chars =
|
||||
"abcdefghijklmnopqrstuvwxyz" /* lowalpha */
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* upalpha */
|
||||
|
@ -943,7 +943,7 @@ tr_httpIsValidURL( const char * url )
|
|||
if( !strchr( rfc2396_valid_chars, *c ) )
|
||||
return FALSE;
|
||||
|
||||
return !tr_httpParseURL( url, -1, NULL, NULL, NULL );
|
||||
return tr_httpParseURL( url, -1, NULL, NULL, NULL ) == 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -375,7 +375,7 @@ void tr_sha1_to_hex( char * out,
|
|||
const uint8_t * sha1 );
|
||||
|
||||
|
||||
int tr_httpIsValidURL( const char * url );
|
||||
tr_bool tr_httpIsValidURL( const char * url );
|
||||
|
||||
int tr_httpParseURL( const char * url,
|
||||
int url_len,
|
||||
|
|
Loading…
Add table
Reference in a new issue