Re: [Qemu-devel] [PATCH] vnc: fix coverity warning

2015-02-12 Thread Markus Armbruster
Gerd Hoffmann kra...@redhat.com writes: +assert(vs); return vnc_socket_local_addr(%s:%s, vs-lsock); } If you want, I can just silence the warning in Coverity. I think in the source code is better, human readers might wonder too. And in case the calling code ever

Re: [Qemu-devel] [PATCH] vnc: fix coverity warning

2015-02-11 Thread Gerd Hoffmann
+assert(vs); return vnc_socket_local_addr(%s:%s, vs-lsock); } If you want, I can just silence the warning in Coverity. I think in the source code is better, human readers might wonder too. And in case the calling code ever changes behavior the assert will trap it (even

Re: [Qemu-devel] [PATCH] vnc: fix coverity warning

2015-02-11 Thread Paolo Bonzini
On 11/02/2015 17:37, Gerd Hoffmann wrote: vnc_display_local_addr will not be called with an invalid display id. Add assert() to silence coverity warning about a null pointer dereference. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+)

[Qemu-devel] [PATCH] vnc: fix coverity warning

2015-02-11 Thread Gerd Hoffmann
vnc_display_local_addr will not be called with an invalid display id. Add assert() to silence coverity warning about a null pointer dereference. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index