|
[libsoup/cache] soup-cache: fix freshness calculation: msg#08191svn-commits-list
commit 657110f01122241575bd179174234d5a68d6efbb Author: Xan Lopez <xan@xxxxxxxxx> Date: Fri Jul 31 22:30:26 2009 +0300 soup-cache: fix freshness calculation Need to cast the lifetime to 'int', since it's potentially (actually, often) compared with negative numbers. libsoup/soup-cache.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) --- diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c index 228f779..9e92160 100644 --- a/libsoup/soup-cache.c +++ b/libsoup/soup-cache.c @@ -188,9 +188,7 @@ static gboolean soup_cache_entry_is_fresh_enough (SoupCacheEntry *entry, int min_fresh) { int limit = (min_fresh == -1) ? soup_cache_entry_get_current_age (entry) : min_fresh; - - g_debug ("IS ENTRY FRESH ENOUGH? LIFETIME %d, CURRENT AGE %d, MIN-FRESH %d, FRESH: %d (Key: %s)", entry->freshness_lifetime, soup_cache_entry_get_current_age (entry), min_fresh, (gboolean) entry->freshness_lifetime > limit, entry->key); - return entry->freshness_lifetime > limit; + return ((int)entry->freshness_lifetime) > limit; } static char * _______________________________________________ SVN-commits-list mailing list (read only) http://mail.gnome.org/mailman/listinfo/svn-commits-list Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want.
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |