gnome-terminal r2688 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2688 - trunk/src
- Date: Thu, 29 May 2008 19:45:21 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:45:21 2008
New Revision: 2688
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2688&view=rev
Log:
Fix the return values in error case.
Modified:
trunk/src/terminal-profile.c
Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c (original)
+++ trunk/src/terminal-profile.c Thu May 29 19:45:21 2008
@@ -1442,9 +1442,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_BOXED (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_BOXED (value), NULL);
if (!value || !G_VALUE_HOLDS_BOXED (value))
- return FALSE;
+ return NULL;
return g_value_get_boxed (value);
}
@@ -1456,9 +1456,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_DOUBLE (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_DOUBLE (value), 0.0);
if (!value || !G_VALUE_HOLDS_DOUBLE (value))
- return FALSE;
+ return 0.0;
return g_value_get_double (value);
}
@@ -1470,9 +1470,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_ENUM (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_ENUM (value), 0);
if (!value || !G_VALUE_HOLDS_ENUM (value))
- return FALSE;
+ return 0;
return g_value_get_enum (value);
}
@@ -1484,9 +1484,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_INT (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_INT (value), 0);
if (!value || !G_VALUE_HOLDS_INT (value))
- return FALSE;
+ return 0;
return g_value_get_int (value);
}
@@ -1498,9 +1498,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_OBJECT (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_OBJECT (value), NULL);
if (!value || !G_VALUE_HOLDS_OBJECT (value))
- return FALSE;
+ return NULL;
return g_value_get_object (value);
}
@@ -1512,9 +1512,9 @@
const GValue *value;
value = get_prop_value_from_prop_name (profile, prop_name);
- g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_STRING (value), FALSE);
+ g_return_val_if_fail (value != NULL && G_VALUE_HOLDS_STRING (value), NULL);
if (!value || !G_VALUE_HOLDS_STRING (value))
- return FALSE;
+ return NULL;
return g_value_get_string (value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]