[libvirt] [PATCH 8/9] Remove conn parameter from JSON error macro

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

 



---
 src/util/json.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/util/json.c b/src/util/json.c
index 62bf8e2..3abff58 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -36,8 +36,8 @@
 
 /* XXX fixme */
 #define VIR_FROM_THIS VIR_FROM_NONE
-#define ReportError(conn, code, fmt...)                                 \
-    virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__,           \
+#define virJSONError(code, fmt...)                                      \
+    virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__,           \
                          __FUNCTION__, __LINE__, fmt)
 
 
@@ -909,9 +909,9 @@ virJSONValuePtr virJSONValueFromString(const char *jsonstring)
                                                (const unsigned char*)jsonstring,
                                                strlen(jsonstring));
 
-        ReportError(NULL, VIR_ERR_INTERNAL_ERROR,
-                    _("cannot parse json %s: %s"),
-                    jsonstring, (const char*) errstr);
+        virJSONError(VIR_ERR_INTERNAL_ERROR,
+                     _("cannot parse json %s: %s"),
+                     jsonstring, (const char*) errstr);
         VIR_FREE(errstr);
         virJSONValueFree(parser.head);
         goto cleanup;
@@ -1034,14 +1034,14 @@ cleanup:
 #else
 virJSONValuePtr virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED)
 {
-    ReportError(NULL, VIR_ERR_INTERNAL_ERROR, "%s",
-                _("No JSON parser implementation is available"));
+    virJSONError(VIR_ERR_INTERNAL_ERROR, "%s",
+                 _("No JSON parser implementation is available"));
     return NULL;
 }
 char *virJSONValueToString(virJSONValuePtr object ATTRIBUTE_UNUSED)
 {
-    ReportError(NULL, VIR_ERR_INTERNAL_ERROR, "%s",
-                _("No JSON parser implementation is available"));
+    virJSONError(VIR_ERR_INTERNAL_ERROR, "%s",
+                 _("No JSON parser implementation is available"));
     return NULL;
 }
 #endif
-- 
1.6.3.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]