From a7c31816288a8f20fc387d69d441413e7a8c9ff1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 29 Apr 2015 15:35:04 -0600 Subject: qobject: Clean up around qtype_code QTYPE_NONE is a sentinel value. No QObject has this type code. Document it properly. Fix dump_qobject() to abort() on QTYPE_NONE, just like for any other invalid type code. Fix to_json() to abort() on all invalid type codes, not just QTYPE_MAX. Clean up Property member qtype's type: it's a qtype_code. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- include/qapi/qmp/qobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/qapi/qmp') diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index d0bbc7c4a6..099129657a 100644 --- a/include/qapi/qmp/qobject.h +++ b/include/qapi/qmp/qobject.h @@ -36,7 +36,7 @@ #include typedef enum { - QTYPE_NONE, + QTYPE_NONE, /* sentinel value, no QObject has this type code */ QTYPE_QINT, QTYPE_QSTRING, QTYPE_QDICT, -- cgit v1.2.3