[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/9] hmp: Compile hmp_info_spice() only with CONFIG_S
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 3/9] hmp: Compile hmp_info_spice() only with CONFIG_SPICE |
Date: |
Thu, 5 Feb 2015 08:36:17 +0100 |
It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash
dereferencing the null pointer returned by the qmp_query_spice()
dummy in qmp.c.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Gerd Hoffmann <address@hidden>
---
hmp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hmp.c b/hmp.c
index 481be80..a42c5c0 100644
--- a/hmp.c
+++ b/hmp.c
@@ -535,6 +535,7 @@ out:
qapi_free_VncInfo(info);
}
+#ifdef CONFIG_SPICE
void hmp_info_spice(Monitor *mon, const QDict *qdict)
{
SpiceChannelList *chan;
@@ -581,6 +582,7 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict)
out:
qapi_free_SpiceInfo(info);
}
+#endif
void hmp_info_balloon(Monitor *mon, const QDict *qdict)
{
--
1.9.3
- [Qemu-devel] [PULL 0/9] qmp hmp balloon: Cleanups around error reporting, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 3/9] hmp: Compile hmp_info_spice() only with CONFIG_SPICE,
Markus Armbruster <=
- [Qemu-devel] [PULL 2/9] qmp hmp: Improve error messages when SPICE is not in use, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 1/9] qmp hmp: Factor out common "using spice" test, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 9/9] balloon: Eliminate silly QERR_ macros, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 7/9] balloon: Inline qemu_balloon(), qemu_balloon_status(), Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 6/9] qmp: Eliminate silly QERR_COMMAND_NOT_FOUND macro, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 5/9] qmp: Simplify recognition of capability negotiation command, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 8/9] balloon: Factor out common "is balloon active" test, Markus Armbruster, 2015/02/05
- [Qemu-devel] [PULL 4/9] qmp: Clean up qmp_query_spice() #ifndef !CONFIG_SPICE dummy, Markus Armbruster, 2015/02/05
- Re: [Qemu-devel] [PULL 0/9] qmp hmp balloon: Cleanups around error reporting, Peter Maydell, 2015/02/05