Re: [Qemu-devel] [PATCH v2 10/15] qapi: Clean up fragile use of error_is_set()

2014-04-29 Thread Michael Roth
Quoting Markus Armbruster (2014-04-28 15:27:49) > 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 n

[Qemu-devel] [PATCH v2 10/15] qapi: Clean up fragile use of error_is_set()

2014-04-28 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 (see