Minor fixes.
* mailbox/attachment.c (MAX_HDR_LEN): Remove unused define. * sieve/sieve.c (parser) <ARGP_KEY_NO_ARGS>: Don't check for the script, (main): ... do it here, instead.
Showing
2 changed files
with
7 additions
and
6 deletions
... | @@ -45,7 +45,6 @@ | ... | @@ -45,7 +45,6 @@ |
45 | #include <mailutils/errno.h> | 45 | #include <mailutils/errno.h> |
46 | #include <mailutils/mutil.h> | 46 | #include <mailutils/mutil.h> |
47 | 47 | ||
48 | #define MAX_HDR_LEN 256 | ||
49 | #define BUF_SIZE 2048 | 48 | #define BUF_SIZE 2048 |
50 | 49 | ||
51 | struct _msg_info | 50 | struct _msg_info | ... | ... |
... | @@ -231,11 +231,6 @@ parser (int key, char *arg, struct argp_state *state) | ... | @@ -231,11 +231,6 @@ parser (int key, char *arg, struct argp_state *state) |
231 | script = mu_tilde_expansion (arg, "/", NULL); | 231 | script = mu_tilde_expansion (arg, "/", NULL); |
232 | break; | 232 | break; |
233 | 233 | ||
234 | case ARGP_KEY_NO_ARGS: | ||
235 | if (!mu_help_config_mode) | ||
236 | argp_error (state, _("SCRIPT must be specified")); | ||
237 | return ARGP_ERR_UNKNOWN; | ||
238 | |||
239 | case ARGP_KEY_INIT: | 234 | case ARGP_KEY_INIT: |
240 | mu_argp_node_list_init (&lst); | 235 | mu_argp_node_list_init (&lst); |
241 | break; | 236 | break; |
... | @@ -243,6 +238,7 @@ parser (int key, char *arg, struct argp_state *state) | ... | @@ -243,6 +238,7 @@ parser (int key, char *arg, struct argp_state *state) |
243 | case ARGP_KEY_FINI: | 238 | case ARGP_KEY_FINI: |
244 | mu_argp_node_list_finish (&lst, NULL, NULL); | 239 | mu_argp_node_list_finish (&lst, NULL, NULL); |
245 | break; | 240 | break; |
241 | |||
246 | default: | 242 | default: |
247 | return ARGP_ERR_UNKNOWN; | 243 | return ARGP_ERR_UNKNOWN; |
248 | } | 244 | } |
... | @@ -499,6 +495,12 @@ main (int argc, char *argv[]) | ... | @@ -499,6 +495,12 @@ main (int argc, char *argv[]) |
499 | argc, argv, ARGP_IN_ORDER, NULL, NULL)) | 495 | argc, argv, ARGP_IN_ORDER, NULL, NULL)) |
500 | exit (EX_USAGE); | 496 | exit (EX_USAGE); |
501 | 497 | ||
498 | if (!script) | ||
499 | { | ||
500 | mu_error (_("script must be specified")); | ||
501 | exit (EX_USAGE); | ||
502 | } | ||
503 | |||
502 | /* Sieve interpreter setup. */ | 504 | /* Sieve interpreter setup. */ |
503 | rc = mu_sieve_machine_init (&mach, NULL); | 505 | rc = mu_sieve_machine_init (&mach, NULL); |
504 | if (rc) | 506 | if (rc) | ... | ... |
-
Please register or sign in to post a comment