[gnome-builder] document: use return_val_if_fail



commit 6fcc4ab32aff6114df1e748ae7632baa5437ac0f
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Dec 15 17:47:09 2014 +0200

    document: use return_val_if_fail

 src/documents/gb-document.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/documents/gb-document.c b/src/documents/gb-document.c
index 1fb270d..940726d 100644
--- a/src/documents/gb-document.c
+++ b/src/documents/gb-document.c
@@ -139,8 +139,8 @@ gb_document_save_finish (GbDocument    *document,
                          GAsyncResult  *result,
                          GError       **error)
 {
-  g_return_if_fail (GB_IS_DOCUMENT (document));
-  g_return_if_fail (G_IS_ASYNC_RESULT (result));
+  g_return_val_if_fail (GB_IS_DOCUMENT (document), FALSE);
+  g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
 
   if (GB_DOCUMENT_GET_INTERFACE (document)->save_finish)
     return GB_DOCUMENT_GET_INTERFACE (document)->
@@ -170,8 +170,8 @@ gb_document_save_as_finish (GbDocument    *document,
                             GAsyncResult  *result,
                             GError       **error)
 {
-  g_return_if_fail (GB_IS_DOCUMENT (document));
-  g_return_if_fail (G_IS_ASYNC_RESULT (result));
+  g_return_val_if_fail (GB_IS_DOCUMENT (document), FALSE);
+  g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
 
   if (GB_DOCUMENT_GET_INTERFACE (document)->save_as_finish)
     return GB_DOCUMENT_GET_INTERFACE (document)->


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]