diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2011-07-23 21:57:56 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2011-07-23 21:57:56 +0800 |
commit | 4ad500dcbb58a5df0585a1b76e7ed715fb6282f7 (patch) | |
tree | 2bffc0239021ddf1a637df8ea44c49a451e4269a | |
parent | 42ff3bc2f7d126444529ee20da1f2e608557f8e5 (diff) | |
download | gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar.gz gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar.bz2 gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar.lz gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar.xz gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.tar.zst gsoc2013-epiphany-4ad500dcbb58a5df0585a1b76e7ed715fb6282f7.zip |
Don't use g_list_length() to check for empty lists
An empty list is simply NULL.
-rw-r--r-- | src/ephy-session.c | 2 | ||||
-rw-r--r-- | src/ephy-tabs-menu.c | 2 |
2 files changed, 2 insertions, 2 deletions
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); |