[json-glib] utils/json_from_string: Don't reset user-provided error argument



commit a15dcc4a1be7daa55aed6153a81abc9a49d0f348
Author: Heinrich Fink <hfink toolsonair com>
Date:   Wed May 11 17:10:10 2016 +0200

    utils/json_from_string: Don't reset user-provided error argument
    
    In json_from_string, just pass the user-provided GError** to
    json_parser_load_from_data. Otherwise json_from_string will never
    propagate any parser errors back to the caller.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766281

 json-glib/json-utils.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-utils.c b/json-glib/json-utils.c
index fc92488..2ba3690 100644
--- a/json-glib/json-utils.c
+++ b/json-glib/json-utils.c
@@ -55,7 +55,6 @@ json_from_string (const char  *str,
 
   g_return_val_if_fail (str != NULL, NULL);
 
-  error = NULL;
   parser = json_parser_new ();
   if (!json_parser_load_from_data (parser, str, -1, error))
     {


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