X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=tag-util.c;h=7091d294beae1cf9c0150377d867604d0fd2d45e;hb=a17eb162ee15e41366ca327250c3935da2df80ed;hp=3bde4097372ab827e91e23ff963f6c5413652f9b;hpb=f00c925bd10c024d5b9f88d8903c7a0d14e9cc6a;p=notmuch diff --git a/tag-util.c b/tag-util.c index 3bde4097..7091d294 100644 --- a/tag-util.c +++ b/tag-util.c @@ -31,17 +31,9 @@ line_error (tag_parse_status_t status, return status; } -/* - * Test tags for some forbidden cases. - * - * return: NULL if OK, - * explanatory message otherwise. - */ - -static const char * +const char * illegal_tag (const char *tag, notmuch_bool_t remove) { - if (*tag == '\0' && ! remove) return "empty tag forbidden"; @@ -162,7 +154,6 @@ tag_parse_status_t parse_tag_command_line (void *ctx, int argc, char **argv, char **query_str, tag_op_list_t *tag_ops) { - int i; for (i = 0; i < argc; i++) { @@ -179,7 +170,7 @@ parse_tag_command_line (void *ctx, int argc, char **argv, msg = illegal_tag (argv[i] + 1, is_remove); if (msg) { - fprintf (stderr, "Error: %s", msg); + fprintf (stderr, "Error: %s\n", msg); return TAG_PARSE_INVALID; } @@ -216,7 +207,6 @@ makes_changes (notmuch_message_t *message, tag_op_list_t *list, tag_op_flag_t flags) { - size_t i; notmuch_tags_t *tags;