gnome-panel r11405 - in trunk/gnome-panel: . libpanel-util
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11405 - in trunk/gnome-panel: . libpanel-util
- Date: Wed, 10 Dec 2008 03:45:36 +0000 (UTC)
Author: vuntz
Date: Wed Dec 10 03:45:36 2008
New Revision: 11405
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11405&view=rev
Log:
2008-12-10 Vincent Untz <vuntz gnome org>
* libpanel-util/panel-list.c: (panel_g_list_swap_next),
(panel_g_list_swap_prev), (panel_g_list_resort_item),
(panel_g_slist_make_unique): various minor cleanups to avoid possible
misuses of this API
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/libpanel-util/panel-list.c
Modified: trunk/gnome-panel/libpanel-util/panel-list.c
==============================================================================
--- trunk/gnome-panel/libpanel-util/panel-list.c (original)
+++ trunk/gnome-panel/libpanel-util/panel-list.c Wed Dec 10 03:45:36 2008
@@ -98,6 +98,9 @@
{
GList *t;
+ if (!dl)
+ return list;
+
if (!dl->next)
return list;
@@ -124,6 +127,9 @@
{
GList *t;
+ if (!dl)
+ return list;
+
if (!dl->prev)
return list;
@@ -153,12 +159,15 @@
{
GList *dl;
+ g_return_val_if_fail (func != NULL, list);
+
if (!list)
return NULL;
- dl = g_list_find (list,data);
+ dl = g_list_find (list, data);
- g_return_val_if_fail (dl != NULL, list);
+ if (dl != NULL)
+ return list;
while (dl->next &&
(*func)(dl->data, dl->next->data) > 0)
@@ -177,7 +186,7 @@
{
GSList *sorted, *l;
- g_assert (compare != NULL);
+ g_return_val_if_fail (compare != NULL, list);
if (!list)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]