Re: [Qemu-devel] [PATCH] chardev-socket: remove useless if

2018-03-20 Thread Peter Xu
On Wed, Mar 21, 2018 at 06:50:46AM +0100, Paolo Bonzini wrote: > On 21/03/2018 04:25, Peter Xu wrote: > > On Tue, Mar 20, 2018 at 04:18:57PM +0100, Paolo Bonzini wrote: > >> This trips Coverity, which believes the subsequent qio_channel_create_watch > >> can dereference a NULL pointer. In reality,

Re: [Qemu-devel] [PATCH] chardev-socket: remove useless if

2018-03-20 Thread Paolo Bonzini
On 21/03/2018 04:25, Peter Xu wrote: > On Tue, Mar 20, 2018 at 04:18:57PM +0100, Paolo Bonzini wrote: >> This trips Coverity, which believes the subsequent qio_channel_create_watch >> can dereference a NULL pointer. In reality, tcp_chr_connect's callers >> all have s->ioc properly initialized, sin

Re: [Qemu-devel] [PATCH] chardev-socket: remove useless if

2018-03-20 Thread Peter Xu
On Tue, Mar 20, 2018 at 04:18:57PM +0100, Paolo Bonzini wrote: > This trips Coverity, which believes the subsequent qio_channel_create_watch > can dereference a NULL pointer. In reality, tcp_chr_connect's callers > all have s->ioc properly initialized, since they are all rooted at > tcp_chr_new_cl

Re: [Qemu-devel] [PATCH] chardev-socket: remove useless if

2018-03-20 Thread Marc-André Lureau
On Tue, Mar 20, 2018 at 4:18 PM, Paolo Bonzini wrote: > This trips Coverity, which believes the subsequent qio_channel_create_watch > can dereference a NULL pointer. In reality, tcp_chr_connect's callers > all have s->ioc properly initialized, since they are all rooted at > tcp_chr_new_client. >

[Qemu-devel] [PATCH] chardev-socket: remove useless if

2018-03-20 Thread Paolo Bonzini
This trips Coverity, which believes the subsequent qio_channel_create_watch can dereference a NULL pointer. In reality, tcp_chr_connect's callers all have s->ioc properly initialized, since they are all rooted at tcp_chr_new_client. Signed-off-by: Paolo Bonzini --- chardev/char-socket.c | 10 ++