[gcr] gck: Add some precondition checks to gck_attributes_find_xxxx()
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr] gck: Add some precondition checks to gck_attributes_find_xxxx()
- Date: Mon, 3 Mar 2014 14:41:19 +0000 (UTC)
commit 63f7a6a2d6967e00a4e88ba47734c5c81be5e07f
Author: Stef Walter <stefw gnome org>
Date: Mon Mar 3 15:39:53 2014 +0100
gck: Add some precondition checks to gck_attributes_find_xxxx()
gck/gck-attributes.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gck/gck-attributes.c b/gck/gck-attributes.c
index d08f879..81716a2 100644
--- a/gck/gck-attributes.c
+++ b/gck/gck-attributes.c
@@ -2188,6 +2188,7 @@ gck_attributes_find (GckAttributes *attrs,
gboolean
gck_attributes_find_boolean (GckAttributes *attrs, gulong attr_type, gboolean *value)
{
+ g_return_val_if_fail (attrs != NULL, FALSE);
g_return_val_if_fail (value, FALSE);
return find_attribute_boolean (attrs->data, attrs->count, attr_type, value);
@@ -2210,6 +2211,7 @@ gck_attributes_find_boolean (GckAttributes *attrs, gulong attr_type, gboolean *v
gboolean
gck_attributes_find_ulong (GckAttributes *attrs, gulong attr_type, gulong *value)
{
+ g_return_val_if_fail (attrs != NULL, FALSE);
g_return_val_if_fail (value, FALSE);
return find_attribute_ulong (attrs->data, attrs->count, attr_type, value);
@@ -2232,6 +2234,7 @@ gck_attributes_find_ulong (GckAttributes *attrs, gulong attr_type, gulong *value
gboolean
gck_attributes_find_string (GckAttributes *attrs, gulong attr_type, gchar **value)
{
+ g_return_val_if_fail (attrs != NULL, FALSE);
g_return_val_if_fail (value, FALSE);
return find_attribute_string (attrs->data, attrs->count, attr_type, value);
@@ -2254,6 +2257,7 @@ gck_attributes_find_string (GckAttributes *attrs, gulong attr_type, gchar **valu
gboolean
gck_attributes_find_date (GckAttributes *attrs, gulong attr_type, GDate *value)
{
+ g_return_val_if_fail (attrs != NULL, FALSE);
g_return_val_if_fail (value, FALSE);
return find_attribute_date (attrs->data, attrs->count, attr_type, value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]