[devhelp] Don't rely on the GError** passed by the caller



commit 6cf3b4a20bc08d9c8245a14ee6abdc60620c6531
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 20 19:15:22 2015 +0100

    Don't rely on the GError** passed by the caller
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742447

 src/dh-parser.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/dh-parser.c b/src/dh-parser.c
index 469da8e..3972f00 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -595,9 +595,8 @@ dh_parser_read_file (const gchar  *path,
                         if (io_status == G_IO_STATUS_EOF || io_status == G_IO_STATUS_ERROR) {
                                 break;
                         }
-                        g_markup_parse_context_parse (parser->context, buf,
-                                                      bytes_read, error);
-                        if (error != NULL && *error != NULL) {
+                        if (!g_markup_parse_context_parse (parser->context, buf,
+                                                           bytes_read, error)) {
                                 result = FALSE;
                                 goto exit;
                         }


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