char: Use return values instead of error_is_set(errp)
authorMarkus Armbruster <armbru@redhat.com>
Mon, 19 May 2014 16:57:34 +0000 (18:57 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 21 May 2014 09:57:57 +0000 (11:57 +0200)
commit5f758366c0710d23e43f4d0f83816b98616a13d0
treedbe5d4add2d20199fa90ca1cd0b2375ca3cb087d
parent3f9286b7214fbc7135d4fc223f07b0b30b91e2f1
char: Use return values instead of error_is_set(errp)

Using error_is_set(errp) to check whether a function call failed is
fragile: it breaks when errp is null.  Check perfectly suitable return
values instead when possible.  As far as I can tell, errp can't be
null there, but this is more robust and more obviously correct

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qemu-char.c