On 01/13/2015 10:50 AM, Markus Armbruster wrote: > Into qemu_using_spice(). For want of a better place, put it next the > existing monitor command handler dummies in qemu-spice.h. > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > include/ui/qemu-spice.h | 10 ++++++++++ > monitor.c | 5 +++-- > qmp.c | 11 +++-------- > 3 files changed, 16 insertions(+), 10 deletions(-) > > diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h > index a93b4b2..b3f2679 100644 > --- a/include/ui/qemu-spice.h > +++ b/include/ui/qemu-spice.h > @@ -88,4 +88,14 @@ static inline int qemu_spice_display_add_client(int csock, > int skipauth, > > #endif /* CONFIG_SPICE */ > > +static inline int qemu_using_spice(Error **errp)
Why not s/int/bool/ > +{ > + if (!using_spice) { > + /* correct one? spice isn't a device ,,, */ > + error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice"); > + return 0; > + } > + return 1; and use true/false here? All callers use it only in a boolean context. Either way, Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature