diff mbox

[RFC,05/15] qapi: Use IGNORE_ERRORS instead of NULL on generated code

Message ID 20170613165313.20954-6-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost June 13, 2017, 4:53 p.m. UTC
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 scripts/qapi-commands.py | 6 +++---
 scripts/qapi-types.py    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 1943de4852..afa58915ba 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -75,7 +75,7 @@  static void qmp_marshal_output_%(c_name)s(%(c_type)s ret_in, QObject **ret_out,
     error_propagate(errp, err);
     visit_free(v);
     v = qapi_dealloc_visitor_new();
-    visit_type_%(c_name)s(v, "unused", &ret_in, NULL);
+    visit_type_%(c_name)s(v, "unused", &ret_in, IGNORE_ERRORS);
     visit_free(v);
 }
 ''',
@@ -162,7 +162,7 @@  out:
 ''')
 
     if have_args:
-        visit_members = ('visit_type_%s_members(v, &arg, NULL);'
+        visit_members = ('visit_type_%s_members(v, &arg, IGNORE_ERRORS);'
                          % arg_type.c_name())
     else:
         visit_members = ''
@@ -173,7 +173,7 @@  out:
 
     ret += mcgen('''
     v = qapi_dealloc_visitor_new();
-    visit_start_struct(v, NULL, NULL, 0, NULL);
+    visit_start_struct(v, NULL, NULL, 0, IGNORE_ERRORS);
     %(visit_members)s
     visit_end_struct(v, NULL);
     visit_free(v);
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 814ac672be..ab78fa56e9 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -157,7 +157,7 @@  void qapi_free_%(c_name)s(%(c_name)s *obj)
     }
 
     v = qapi_dealloc_visitor_new();
-    visit_type_%(c_name)s(v, NULL, &obj, NULL);
+    visit_type_%(c_name)s(v, NULL, &obj, IGNORE_ERRORS);
     visit_free(v);
 }
 ''',