changeset 9677:70ff55c0939b

[gaim-migrate @ 10529] i think this will make for fewer useless disk reads when you have sort-by-log turned on, and have a lot of people you don't talk to on your buddy list. stalkers rejoice! committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 05 Aug 2004 17:34:02 +0000
parents f83a80c25703
children 640102510dec
files src/log.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/log.c	Thu Aug 05 17:11:10 2004 +0000
+++ b/src/log.c	Thu Aug 05 17:34:02 2004 +0000
@@ -134,7 +134,8 @@
 
 int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account)
 {
-	int size;
+	gpointer ptrsize;
+	int size = 0;
 	GSList *n;
 	struct _gaim_logsize_user *lu;
 
@@ -142,7 +143,8 @@
 	lu->name = g_strdup(gaim_normalize(account, name));
 	lu->account = account;
 
-	if((size = GPOINTER_TO_INT(g_hash_table_lookup(logsize_users, lu)))) {
+	if(g_hash_table_lookup_extended(logsize_users, lu, NULL, &ptrsize)) {
+		size = GPOINTER_TO_INT(ptrsize);
 		g_free(lu->name);
 		g_free(lu);
 	} else {