Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-26 Thread Peter Maydell
On 25 April 2014 11:44, Markus Armbruster arm...@redhat.com wrote: 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

[Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Markus Armbruster
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

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Andreas Färber
Am 25.04.2014 12:44, schrieb Markus Armbruster: 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

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Peter Maydell
On 25 April 2014 12:25, Andreas Färber afaer...@suse.de wrote: I do wonder, and maybe Peter can comment as native speaker, whether it should be uses (plural) or usage in both subjects? In this subject I would consider all of use, uses and usage as acceptable variations. thanks -- PMM

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Markus Armbruster
Andreas Färber afaer...@suse.de writes: Am 25.04.2014 12:44, schrieb Markus Armbruster: 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

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Andreas Färber
Am 25.04.2014 14:55, schrieb Markus Armbruster: Andreas Färber afaer...@suse.de writes: Am 25.04.2014 12:44, schrieb Markus Armbruster: 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

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Markus Armbruster
Andreas Färber afaer...@suse.de writes: Am 25.04.2014 14:55, schrieb Markus Armbruster: Andreas Färber afaer...@suse.de writes: Am 25.04.2014 12:44, schrieb Markus Armbruster: Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque.