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 /fish/tilde.c | |
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 'fish/tilde.c')
-rw-r--r-- | fish/tilde.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fish/tilde.c b/fish/tilde.c index 64b5b399..c599e16f 100644 --- a/fish/tilde.c +++ b/fish/tilde.c @@ -62,7 +62,7 @@ try_tilde_expansion (char *str) str = malloc (len); if (str == NULL) { perror ("malloc"); - exit (1); + exit (EXIT_FAILURE); } strcpy (str, home); strcat (str, rest); @@ -89,7 +89,7 @@ expand_home (const char *append) str = malloc (len); if (str == NULL) { perror ("malloc"); - exit (1); + exit (EXIT_FAILURE); } strcpy (str, home); |