[gnome-alsamixer] Fix use of g_return_if_fail() in function returning non-void
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-alsamixer] Fix use of g_return_if_fail() in function returning non-void
- Date: Tue, 26 Jun 2012 14:11:12 +0000 (UTC)
commit 2bbb575bbe9362bfbf022227548591cc69982642
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jun 26 14:53:19 2012 +0100
Fix use of g_return_if_fail() in function returning non-void
src/gam-app.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gam-app.c b/src/gam-app.c
index 31fc345..b00443d 100644
--- a/src/gam-app.c
+++ b/src/gam-app.c
@@ -201,8 +201,8 @@ gam_app_delete (GtkWidget *widget, gpointer user_data)
GamApp *gam_app;
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GAM_IS_APP (widget));
+ g_return_val_if_fail (widget != NULL, FALSE);
+ g_return_val_if_fail (GAM_IS_APP (widget), FALSE);
gam_app = GAM_APP (widget);
@@ -394,7 +394,7 @@ gam_app_get_current_mixer (GamApp *gam_app)
GamAppPrivate *priv;
GtkWidget *mixer;
- g_return_if_fail (GAM_IS_APP (gam_app));
+ g_return_val_if_fail (GAM_IS_APP (gam_app), NULL);
priv = GAM_APP_GET_PRIVATE (gam_app);
@@ -621,7 +621,7 @@ gam_app_get_gconf_client (GamApp *gam_app)
{
GamAppPrivate *priv;
- g_return_if_fail (GAM_IS_APP (gam_app));
+ g_return_val_if_fail (GAM_IS_APP (gam_app), NULL);
priv = GAM_APP_GET_PRIVATE (gam_app);
@@ -634,7 +634,7 @@ gam_app_get_mixer_slider_style (GamApp *gam_app)
const gchar *key = "/apps/gnome-alsamixer/geometry/mixer_slider_style";
gint style = 0;
- g_return_if_fail (GAM_IS_APP (gam_app));
+ g_return_val_if_fail (GAM_IS_APP (gam_app), 0);
if (gconf_client_dir_exists (gam_app_get_gconf_client (gam_app), key, NULL))
style = gconf_client_get_int (gam_app_get_gconf_client (gam_app),
@@ -665,7 +665,7 @@ gam_app_get_slider_toggle_style (GamApp *gam_app)
const gchar *key = "/apps/gnome-alsamixer/geometry/mixer_slider_toggle_style";
gint style = 1;
- g_return_if_fail (GAM_IS_APP (gam_app));
+ g_return_val_if_fail (GAM_IS_APP (gam_app), 0);
if (gconf_client_dir_exists (gam_app_get_gconf_client (gam_app), key, NULL))
style = gconf_client_get_int (gam_app_get_gconf_client (gam_app),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]