From 306d26a97cb68d2e2f0ed96394f4fab012ee02d9 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 12 Aug 2009 19:44:32 +0000 Subject: [PATCH] (trunk libT) very minor tweak: tr_httpIsValidURL() should return a tr_bool, not an int. --- libtransmission/utils.c | 6 +++--- libtransmission/utils.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtransmission/utils.c b/libtransmission/utils.c index 062d6016c..761006ed4 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -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 diff --git a/libtransmission/utils.h b/libtransmission/utils.h index d9f4ca04a..7a367573e 100644 --- a/libtransmission/utils.h +++ b/libtransmission/utils.h @@ -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,