(main): Return EX_USAGE on command line usage errors.
Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -86,7 +86,7 @@ main (int argc, char *argv[]) | ... | @@ -86,7 +86,7 @@ main (int argc, char *argv[]) |
86 | if (from != NULL) | 86 | if (from != NULL) |
87 | { | 87 | { |
88 | mu_error ("multiple --from options"); | 88 | mu_error ("multiple --from options"); |
89 | return 1; | 89 | return EX_USAGE; |
90 | } | 90 | } |
91 | from = optarg; | 91 | from = optarg; |
92 | break; | 92 | break; |
... | @@ -143,7 +143,7 @@ main (int argc, char *argv[]) | ... | @@ -143,7 +143,7 @@ main (int argc, char *argv[]) |
143 | break; | 143 | break; |
144 | 144 | ||
145 | default: | 145 | default: |
146 | return 1; | 146 | return EX_USAGE; |
147 | } | 147 | } |
148 | 148 | ||
149 | argc -= optind; | 149 | argc -= optind; |
... | @@ -156,7 +156,7 @@ main (int argc, char *argv[]) | ... | @@ -156,7 +156,7 @@ main (int argc, char *argv[]) |
156 | if (!maildir) | 156 | if (!maildir) |
157 | { | 157 | { |
158 | mu_error ("Badly formed maildir: %s", maildir); | 158 | mu_error ("Badly formed maildir: %s", maildir); |
159 | return 1; | 159 | return EX_CONFIG; |
160 | } | 160 | } |
161 | 161 | ||
162 | #ifdef HAVE_MYSQL | 162 | #ifdef HAVE_MYSQL |
... | @@ -462,6 +462,7 @@ deliver (FILE *fp, char *name) | ... | @@ -462,6 +462,7 @@ deliver (FILE *fp, char *name) |
462 | { | 462 | { |
463 | mailer_err ("cannot lock mailbox '%s': %s", path, strerror (status)); | 463 | mailer_err ("cannot lock mailbox '%s': %s", path, strerror (status)); |
464 | mailbox_destroy (&mbox); | 464 | mailbox_destroy (&mbox); |
465 | exit_code = EX_TEMPFAIL; | ||
465 | return; | 466 | return; |
466 | } | 467 | } |
467 | 468 | ... | ... |
-
Please register or sign in to post a comment