On 19 September 2016 at 10:46, Laurent Vivier <lviv...@redhat.com> wrote: > ----------------------------------------------------------------------- > Portability note: Some non-POSIX systems use different conventions for > exit status values. For greater portability, you can use the macros > EXIT_SUCCESS and EXIT_FAILURE for the conventional status value for > success and failure, respectively. They are declared in the file stdlib.h.
The only non-POSIX system we support is mingw32, which also uses 0/1 for its exit codes. The POSIX rationale for exit() also notes that EXIT_SUCCESS is required to be 0. Personally I think we should: * definitely fix the "exit(-1)" and other exit-with-negative-number bugs in the codebase * possibly add a checkpatch check for exit-with-negative-constant-arg If we're going to do anything else then maybe we could change the EXIT_SUCCESS/EXIT_FAILURE instances in the codebase, but really I think there are more important inconsistencies to address (like all the unconverted non-QOM devices). thanks -- PMM