diff options
author | Jim Meyering <meyering@redhat.com> | 2009-11-20 12:09:42 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-20 12:14:14 +0000 |
commit | c372c7c23a298a940b8a0868396ef2ae0d824e4d (patch) | |
tree | 2c6bec16fd926e0bfd357c2623864f19f666decf /capitests | |
parent | e94f89f40d989d111882178c87b5bfc22314fca8 (diff) | |
download | libguestfs-c372c7c23a298a940b8a0868396ef2ae0d824e4d.tar.gz libguestfs-c372c7c23a298a940b8a0868396ef2ae0d824e4d.tar.xz libguestfs-c372c7c23a298a940b8a0868396ef2ae0d824e4d.zip |
maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exit
Convert all uses automatically, via these two commands:
git grep -l '\<exit *(1)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
git grep -l '\<exit *(0)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
* .x-sc_prohibit_magic_number_exit: New file.
Edit (RWMJ): Don't change Java code.
Diffstat (limited to 'capitests')
-rw-r--r-- | capitests/test-command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/capitests/test-command.c b/capitests/test-command.c index 7a3e64bd..e5cdc93a 100644 --- a/capitests/test-command.c +++ b/capitests/test-command.c @@ -57,12 +57,12 @@ main (int argc, char *argv[]) printf ("Result11-1\nResult11-2"); } else { fprintf (stderr, "unknown parameter: %s\n", argv[1]); - exit (1); + exit (EXIT_FAILURE); } } else { fprintf (stderr, "missing parameter\n"); - exit (1); + exit (EXIT_FAILURE); } - exit (0); + exit (EXIT_SUCCESS); } |