[vlc-commits] httpcookies: fix sign warnings
Rémi Denis-Courmont
git at videolan.org
Tue Feb 21 19:04:05 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 21 20:03:47 2017 +0200| [eb839de292cec5c8bce462978ea2070607c892af] | committer: Rémi Denis-Courmont
httpcookies: fix sign warnings
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb839de292cec5c8bce462978ea2070607c892af
---
src/misc/httpcookies.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/misc/httpcookies.c b/src/misc/httpcookies.c
index b6d174b..2e4d3a8 100644
--- a/src/misc/httpcookies.c
+++ b/src/misc/httpcookies.c
@@ -286,8 +286,7 @@ void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar )
if ( !p_jar )
return;
- int i;
- for( i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
+ for( size_t i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
cookie_destroy( vlc_array_item_at_index( &p_jar->cookies, i ) );
vlc_array_clear( &p_jar->cookies );
@@ -302,8 +301,6 @@ bool vlc_http_cookies_store(vlc_http_cookie_jar_t *p_jar, const char *cookies,
assert(host != NULL);
assert(path != NULL);
- int i;
-
http_cookie_t *cookie = cookie_parse(cookies, host, path);
if (cookie == NULL)
return false;
@@ -323,7 +320,7 @@ bool vlc_http_cookies_store(vlc_http_cookie_jar_t *p_jar, const char *cookies,
vlc_mutex_lock( &p_jar->lock );
- for( i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
+ for( size_t i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
{
http_cookie_t *iter = vlc_array_item_at_index( &p_jar->cookies, i );
@@ -353,12 +350,11 @@ bool vlc_http_cookies_store(vlc_http_cookie_jar_t *p_jar, const char *cookies,
char *vlc_http_cookies_fetch(vlc_http_cookie_jar_t *p_jar, bool secure,
const char *host, const char *path)
{
- int i;
char *psz_cookiebuf = NULL;
vlc_mutex_lock( &p_jar->lock );
- for( i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
+ for( size_t i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )
{
const http_cookie_t * cookie = vlc_array_item_at_index( &p_jar->cookies, i );
if (cookie_should_be_sent(cookie, secure, host, path))
More information about the vlc-commits
mailing list