[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 3f9286: qemu-socket: Clean up inet_connect_op
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 3f9286: qemu-socket: Clean up inet_connect_opts() |
Date: |
Thu, 22 May 2014 11:30:04 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 3f9286b7214fbc7135d4fc223f07b0b30b91e2f1
https://github.com/qemu/qemu/commit/3f9286b7214fbc7135d4fc223f07b0b30b91e2f1
Author: Markus Armbruster <address@hidden>
Date: 2014-05-21 (Wed, 21 May 2014)
Changed paths:
M util/qemu-sockets.c
Log Message:
-----------
qemu-socket: Clean up inet_connect_opts()
Separate the search for a working addrinfo from the code that does
something with it. Makes for a clearer search loop.
Use a local Error * to simplify resetting the error in the search
loop.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 5f758366c0710d23e43f4d0f83816b98616a13d0
https://github.com/qemu/qemu/commit/5f758366c0710d23e43f4d0f83816b98616a13d0
Author: Markus Armbruster <address@hidden>
Date: 2014-05-21 (Wed, 21 May 2014)
Changed paths:
M qemu-char.c
Log Message:
-----------
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 <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 0aff637e920c0cdb74338c6f57005f2d7cab63d6
https://github.com/qemu/qemu/commit/0aff637e920c0cdb74338c6f57005f2d7cab63d6
Author: Markus Armbruster <address@hidden>
Date: 2014-05-21 (Wed, 21 May 2014)
Changed paths:
M qemu-char.c
Log Message:
-----------
char: Clean up fragile use of error_is_set()
Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP
may be null, because errors go undetected when it is. It's fragile
when proving ERRP non-null involves a non-local argument. Else, it's
unnecessarily opaque (see commit 84d18f0).
The error_is_set(errp) in qemu_chr_new_from_opts() is merely fragile,
because the callers never pass a null errp argument.
Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 3894c78764e1e6d8ef82c7c097749d10cf8c3981
https://github.com/qemu/qemu/commit/3894c78764e1e6d8ef82c7c097749d10cf8c3981
Author: Markus Armbruster <address@hidden>
Date: 2014-05-21 (Wed, 21 May 2014)
Changed paths:
M qemu-char.c
Log Message:
-----------
char: Explain qmp_chardev_add()'s unusual error handling
Character backend open hasn't been fully converted to the Error API.
Some opens fail without setting an error. qmp_chardev_add() needs to
detect when that happens, and set a generic error. Explain that in a
comment, and inline error_is_set() for clarity.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: d2e064a73ee7e5af244ff7b6406ac2344bbaa231
https://github.com/qemu/qemu/commit/d2e064a73ee7e5af244ff7b6406ac2344bbaa231
Author: Markus Armbruster <address@hidden>
Date: 2014-05-21 (Wed, 21 May 2014)
Changed paths:
M include/qapi/error.h
M util/error.c
Log Message:
-----------
error: error_is_set() is finally unused; remove
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 6054d883d6138bfc92c73a7c090c824b64086fd2
https://github.com/qemu/qemu/commit/6054d883d6138bfc92c73a7c090c824b64086fd2
Author: Peter Maydell <address@hidden>
Date: 2014-05-22 (Thu, 22 May 2014)
Changed paths:
M include/qapi/error.h
M qemu-char.c
M util/error.c
M util/qemu-sockets.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-2' into staging
purge error_is_set()
# gpg: Signature made Wed 21 May 2014 11:43:44 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>"
# gpg: aka "Gerd Hoffmann <address@hidden>"
# gpg: aka "Gerd Hoffmann (private) <address@hidden>"
* remotes/kraxel/tags/pull-chardev-2:
error: error_is_set() is finally unused; remove
char: Explain qmp_chardev_add()'s unusual error handling
char: Clean up fragile use of error_is_set()
char: Use return values instead of error_is_set(errp)
qemu-socket: Clean up inet_connect_opts()
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/5118dc5975e6...6054d883d613
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 3f9286: qemu-socket: Clean up inet_connect_opts(),
GitHub <=