[Xfce4-commits] r26651 - xfdesktop/branches/xfce_4_4/modules/menu
Brian Tarricone
kelnos at xfce.org
Thu Feb 28 14:36:57 CET 2008
Author: kelnos
Date: 2008-02-28 13:36:56 +0000 (Thu, 28 Feb 2008)
New Revision: 26651
Modified:
xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-cache.c
Log:
simplify some code
Modified: xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-cache.c
===================================================================
--- xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-cache.c 2008-02-28 02:57:40 UTC (rev 26650)
+++ xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-cache.c 2008-02-28 13:36:56 UTC (rev 26651)
@@ -453,17 +453,11 @@
menu_tree = NULL;
}
- for(l = menu_files; l; l = l->next)
- g_free(l->data);
- if(menu_files) {
- g_list_free(menu_files);
- menu_files = NULL;
- }
+ g_list_foreach(menu_files, (GFunc)g_free, NULL);
+ g_list_free(menu_files);
+ menu_files = NULL;
- for(l = dentry_dirs; l; l = l->next)
- g_free(l->data);
- if(dentry_dirs) {
- g_list_free(dentry_dirs);
- dentry_dirs = NULL;
- }
+ g_list_foreach(dentry_dirs, (GFunc)g_free, NULL);
+ g_list_free(dentry_dirs);
+ dentry_dirs = NULL;
}
More information about the Xfce4-commits
mailing list