[Qemu-devel] [PATCH] ccid-card-emulated: use EventNotifier

2014-06-23 Thread Paolo Bonzini
Shut up Coverity's complaint about unchecked fcntl return values, and especially make the code simpler and more efficient. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/usb/ccid-card-emulated.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff

Re: [Qemu-devel] [PATCH] ccid-card-emulated: use EventNotifier

2014-06-23 Thread Alon Levy
Shut up Coverity's complaint about unchecked fcntl return values, and especially make the code simpler and more efficient. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Alon Levy al...@redhat.com one question below. --- hw/usb/ccid-card-emulated.c | 29

Re: [Qemu-devel] [PATCH] ccid-card-emulated: use EventNotifier

2014-06-23 Thread Paolo Bonzini
Il 23/06/2014 12:38, Alon Levy ha scritto: { -EmulatedState *card = opaque; +EmulatedState *card = container_of(notifier, EmulatedState, notifier); EmulEvent *event, *next; -char dummy; -int len; -do { -len = read(card-pipe[0], dummy, sizeof(dummy)); -