Message ID | 20230412185102.441523-6-dwmw2@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Xen emulation build/Coverity fixes | expand |
On Wed, 12 Apr 2023 at 19:52, David Woodhouse <dwmw2@infradead.org> wrote: > > From: David Woodhouse <dwmw@amazon.co.uk> > > Coverity points out that if (!s && !s->impl) isn't really what we intended > to do here. CID 1508131. > > Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> > --- Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
On 12/04/2023 19:51, David Woodhouse wrote: > From: David Woodhouse <dwmw@amazon.co.uk> > > Coverity points out that if (!s && !s->impl) isn't really what we intended > to do here. CID 1508131. > > Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> > --- > hw/i386/kvm/xen_xenstore.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Paul Durrant <paul@xen.org>
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index 900679af8a..65f91e87d7 100644 --- a/hw/i386/kvm/xen_xenstore.c +++ b/hw/i386/kvm/xen_xenstore.c @@ -1688,7 +1688,7 @@ static struct qemu_xs_handle *xs_be_open(void) XenXenstoreState *s = xen_xenstore_singleton; struct qemu_xs_handle *h; - if (!s && !s->impl) { + if (!s || !s->impl) { errno = -ENOSYS; return NULL; }