[grilo] Add verifications to the beginning of functions
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] Add verifications to the beginning of functions
- Date: Fri, 11 Jun 2010 09:43:58 +0000 (UTC)
commit 10398b269480ab67e0712e305d3d06ad3f2774a4
Author: Joaquim Rocha <jrocha igalia com>
Date: Fri Jun 11 10:36:29 2010 +0200
Add verifications to the beginning of functions
src/grl-metadata-source.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index d98c6eb..fef9085 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -746,6 +746,7 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source,
/* TODO: All these filer_* methods could probably reuse most of the code */
g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL);
+ g_return_val_if_fail (keys != NULL, NULL);
writable_keys = grl_metadata_source_writable_keys (source);
if (!writable_keys) {
@@ -790,6 +791,9 @@ grl_metadata_source_setup_full_resolution_mode (GrlMetadataSource *source,
const GList *keys,
struct SourceKeyMapList *key_mapping)
{
+ g_return_if_fail (GRL_IS_METADATA_SOURCE (source));
+ g_return_if_fail (key_mapping != NULL);
+
key_mapping->source_maps = NULL;
key_mapping->operation_keys = NULL;
@@ -1046,6 +1050,9 @@ grl_metadata_source_supported_operations_impl (GrlMetadataSource *source)
{
GrlSupportedOps caps = GRL_OP_NONE;
GrlMetadataSourceClass *metadata_source_class;
+
+ g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), caps);
+
metadata_source_class = GRL_METADATA_SOURCE_GET_CLASS (source);
if (metadata_source_class->resolve)
caps |= GRL_OP_RESOLVE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]