From e8efa11da90fa47adcbc489638320d61ac98391a Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Sun, 23 Jun 2013 14:23:54 +1000 Subject: tag-util: move out 'tag' command-line check Move an error condition specific to the 'tag' command out of parse_tag_command_line so that parse_tag_command_line can be used for the forthcoming 'insert' command. --- tag-util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tag-util.c') diff --git a/tag-util.c b/tag-util.c index c5f58595..92e08a1d 100644 --- a/tag-util.c +++ b/tag-util.c @@ -190,9 +190,9 @@ parse_tag_command_line (void *ctx, int argc, char **argv, *query_str = query_string_from_args (ctx, argc - i, &argv[i]); - if (*query_str == NULL || **query_str == '\0') { - fprintf (stderr, "Error: notmuch tag requires at least one search term.\n"); - return TAG_PARSE_INVALID; + if (*query_str == NULL) { + fprintf (stderr, "Out of memory.\n"); + return TAG_PARSE_OUT_OF_MEMORY; } return TAG_PARSE_SUCCESS; -- cgit v1.2.3