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
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
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));
-