[ostree] core: checksum builtin: Actually quit main loop on error too



commit cb5b3b15f50b54b64dc311add3736f2e49bbf044
Author: Colin Walters <walters verbum org>
Date:   Mon Nov 28 19:34:54 2011 -0500

    core: checksum builtin: Actually quit main loop on error too

 src/ostree/ot-builtin-checksum.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ostree/ot-builtin-checksum.c b/src/ostree/ot-builtin-checksum.c
index d6536e3..0eb5a03 100644
--- a/src/ostree/ot-builtin-checksum.c
+++ b/src/ostree/ot-builtin-checksum.c
@@ -44,12 +44,12 @@ on_checksum_received (GObject    *obj,
   GChecksum *checksum = NULL;
   AsyncChecksumData *data = user_data;
 
-  if (!ostree_checksum_file_async_finish ((GFile*)obj, result, &checksum, data->error))
-    return;
-
-  g_print ("%s\n", g_checksum_get_string (checksum));
- 
-  g_checksum_free (checksum);
+  if (ostree_checksum_file_async_finish ((GFile*)obj, result, &checksum, data->error))
+    {
+      g_print ("%s\n", g_checksum_get_string (checksum));
+      
+      g_checksum_free (checksum);
+    }
   
   g_main_loop_quit (data->loop);
 }



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