changeset 18582:882ea30935a9

merge of '68531d78c3d980fcba8b12d95053cfc541f7be31' and 'de1edd80332006c829962910c72b5d0edb9ab54d'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 21 Jul 2007 05:47:46 +0000
parents 743d183d09da (current diff) dcb1d1af30a1 (diff)
children cf7297803a73
files
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntstyle.c	Sat Jul 21 02:17:38 2007 +0000
+++ b/finch/libgnt/gntstyle.c	Sat Jul 21 05:47:46 2007 +0000
@@ -145,8 +145,8 @@
 		int j;
 		GntWS *ws;
 		gchar **titles;
-		char *group = calloc(12, 1);
-		g_sprintf(group, "Workspace-%d", i);
+		char group[32];
+		g_snprintf(group, sizeof(group), "Workspace-%d", i);
 		name = g_key_file_get_value(gkfile, group, "name", NULL);
 		if (!name)
 			return;
@@ -168,7 +168,6 @@
 				g_hash_table_replace(wm->title_places, g_strdup(titles[j]), ws);
 			g_strfreev(titles);
 		}
-		g_free(group);
 	}
 #endif
 }