pidgin: f77abf83: Avoid an unnecessary alloc/free.
datallah at pidgin.im
datallah at pidgin.im
Tue Sep 15 11:45:39 EDT 2009
-----------------------------------------------------------------
Revision: f77abf837b111f0ba4c23fd630ad2dbd2be64035
Ancestor: dcfab91cc079ca598182dfd32e194e5a399db1f5
Author: datallah at pidgin.im
Date: 2009-09-15T15:43:29
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f77abf837b111f0ba4c23fd630ad2dbd2be64035
Modified files:
pidgin/gtksound.c
ChangeLog:
Avoid an unnecessary alloc/free.
-------------- next part --------------
============================================================
--- pidgin/gtksound.c b337a77cea04b987c3dab2ae2762ce50efd5518d
+++ pidgin/gtksound.c 95797bc181c38e5566f9f36c0305d9cef140f3a5
@@ -617,19 +617,16 @@ pidgin_sound_is_customized(void)
pidgin_sound_is_customized(void)
{
gint i;
- gchar *path, *file;
+ gchar *path;
+ const char *file;
for (i = 0; i < PURPLE_NUM_SOUNDS; i++) {
path = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", sounds[i].pref);
- file = g_strdup(purple_prefs_get_path(path));
+ file = purple_prefs_get_path(path);
g_free(path);
- if (file && file[0] != '\0'){
- g_free(file);
+ if (file && file[0] != '\0')
return TRUE;
- }
-
- g_free(file);
}
return FALSE;
More information about the Commits
mailing list