diff --git a/src/gcal-application.c b/src/gcal-application.c index 49b23f3e..66381075 100644 --- a/src/gcal-application.c +++ b/src/gcal-application.c @@ -2,17 +2,17 @@ /* * gcal-application.c * Copyright (C) 2012 Erick Pérez Castellanos - * + * * gnome-calendar is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * gnome-calendar is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -96,8 +96,7 @@ gcal_application_finalize (GObject *object) g_return_if_fail (GCAL_IS_APPLICATION (object)); priv = GCAL_APPLICATION (object)->priv; - if (priv->settings != NULL) - g_clear_object (&(priv->settings)); + g_clear_object (&(priv->settings)); if (G_OBJECT_CLASS (gcal_application_parent_class)->finalize != NULL) G_OBJECT_CLASS (gcal_application_parent_class)->finalize (object); @@ -166,7 +165,7 @@ gcal_application_startup (GApplication *app) gcal_application_set_app_menu (app); } -static void +static void gcal_application_set_app_menu (GApplication *app) { GcalApplicationPrivate *priv; diff --git a/src/gcal-manager.c b/src/gcal-manager.c index f27d1dae..cc4ba527 100644 --- a/src/gcal-manager.c +++ b/src/gcal-manager.c @@ -613,8 +613,7 @@ gcal_manager_reload_view (GcalManager *manager, g_return_if_fail (priv->query != NULL); /* stopping */ - if (unit->view != NULL) - g_clear_object (&(unit->view)); + g_clear_object (&(unit->view)); error = NULL; if (e_cal_client_get_view_sync (unit->client, diff --git a/src/gcal-toolbar.c b/src/gcal-toolbar.c index 0e447737..8cfe4d4e 100644 --- a/src/gcal-toolbar.c +++ b/src/gcal-toolbar.c @@ -246,17 +246,12 @@ gcal_toolbar_finalize (GObject *object) g_return_if_fail (GCAL_IS_TOOLBAR (object)); priv = GCAL_TOOLBAR (object)->priv; - if (priv->add_button != NULL) - g_clear_object (&(priv->add_button)); - if (priv->views_box != NULL) - g_clear_object (&(priv->views_box)); - if (priv->right_box != NULL) - g_clear_object (&(priv->right_box)); + g_clear_object (&(priv->add_button)); + g_clear_object (&(priv->views_box)); + g_clear_object (&(priv->right_box)); - if (priv->back_button) - g_clear_object (&(priv->back_button)); - if (priv->edit_button) - g_clear_object (&(priv->edit_button)); + g_clear_object (&(priv->back_button)); + g_clear_object (&(priv->edit_button)); G_OBJECT_CLASS (gcal_toolbar_parent_class)->finalize (object); }