]> git.notmuchmail.org Git - notmuch/commitdiff
cli: remove useless talloc_strdup
authorJani Nikula <jani@nikula.org>
Sun, 31 Mar 2013 09:45:58 +0000 (12:45 +0300)
committerDavid Bremner <bremner@unb.ca>
Mon, 1 Apr 2013 13:34:44 +0000 (09:34 -0400)
If the condition holds, query_string_from_args() has already returned
a talloc allocated empty string. There's no need to duplicate that.

notmuch-count.c

index 390794ff9ae45c1719e7aadcf72933ce054106e7..c2f1b7db51a34a2f4b76eb6aa6b88f74a86b26f0 100644 (file)
@@ -71,10 +71,6 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
        return 1;
     }
 
        return 1;
     }
 
-    if (*query_str == '\0') {
-       query_str = talloc_strdup (config, "");
-    }
-
     query = notmuch_query_create (notmuch, query_str);
     if (query == NULL) {
        fprintf (stderr, "Out of memory\n");
     query = notmuch_query_create (notmuch, query_str);
     if (query == NULL) {
        fprintf (stderr, "Out of memory\n");