From 4ad500dcbb58a5df0585a1b76e7ed715fb6282f7 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Sat, 23 Jul 2011 16:57:56 +0300 Subject: Don't use g_list_length() to check for empty lists An empty list is simply NULL. --- src/ephy-session.c | 2 +- src/ephy-tabs-menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ephy-session.c b/src/ephy-session.c index af2ec68a0..0fea3304d 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -208,7 +208,7 @@ client_quit_requested_cb (EggSMClient *sm_client, */ downloads = ephy_embed_shell_get_downloads (embed_shell); - if (ephy_shell_get_default () == NULL || g_list_length (downloads) == 0) + if (ephy_shell_get_default () == NULL || downloads == NULL) { egg_sm_client_will_quit (sm_client, TRUE); return; diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c index 2cb79b65a..4e5f8ee54 100644 --- a/src/ephy-tabs-menu.c +++ b/src/ephy-tabs-menu.c @@ -460,7 +460,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu) tabs = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (p->window)); - if (g_list_length (tabs) == 0) return; + if (tabs == NULL) return; manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (p->window)); p->ui_id = gtk_ui_manager_new_merge_id (manager); -- cgit v1.2.3