/soc/2013/ankitkv/gobjectification: 81d8c99ac9b3: Initialize len...

Ankit Vani a at nevitus.org
Tue Oct 1 15:35:17 EDT 2013


Changeset: 81d8c99ac9b3121e93dafb3aedfbc42edae66773
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-10-02 00:24 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/81d8c99ac9b3

Description:

Initialize len = 0 before pidgin_convert_buddy_icon()

diffstat:

 pidgin/gtkaccount.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -483,7 +483,7 @@ icon_filesel_choose_cb(const char *filen
 
 	if (filename != NULL)
 	{
-		size_t len;
+		size_t len = 0;
 		gpointer data = pidgin_convert_buddy_icon(dialog->plugin, filename, &len);
 		set_dialog_icon(dialog, data, len, g_strdup(filename));
 	}
@@ -519,7 +519,7 @@ account_dnd_recv(GtkWidget *widget, GdkD
 			GError *converr = NULL;
 			gchar *tmp, *rtmp;
 			gpointer data;
-			size_t len;
+			size_t len = 0;
 
 			/* It looks like we're dealing with a local file. */
 			if(!(tmp = g_filename_from_uri(name, NULL, &converr))) {
@@ -1523,7 +1523,7 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
 		}
 		else if ((filename = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon")) && icon_change)
 		{
-			size_t len;
+			size_t len = 0;
 			gpointer data = pidgin_convert_buddy_icon(dialog->plugin, filename, &len);
 			purple_account_set_buddy_icon_path(account, filename);
 			purple_buddy_icons_set_account_icon(account, data, len);



More information about the Commits mailing list