[PATCH v3 1/6] cli: remove useless talloc_strdup

Jani Nikula jani at nikula.org
Sun Mar 31 02:45:58 PDT 2013


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 |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/notmuch-count.c b/notmuch-count.c
index 390794f..c2f1b7d 100644
--- a/notmuch-count.c
+++ b/notmuch-count.c
@@ -71,10 +71,6 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
 	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");
-- 
1.7.10.4



More information about the notmuch mailing list