summaryrefslogtreecommitdiffstats
path: root/notmuch-count.c
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-09-27 12:31:56 -0300
committerDavid Bremner <david@tethera.net>2015-10-05 19:39:53 -0300
commit81bd41c7cb59a8d70932e6bdbee6e1e2cde5477f (patch)
treefa09aa14727886ea6d550793341dfe4e77a3d4d4 /notmuch-count.c
parent65a6b86873a471bb87d30a8617a87857103cd8b6 (diff)
cli/count: simplify and document return value of print_count
Essentially a cosmetic change.
Diffstat (limited to 'notmuch-count.c')
-rw-r--r--notmuch-count.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-count.c b/notmuch-count.c
index 09613e6a..be3e2365 100644
--- a/notmuch-count.c
+++ b/notmuch-count.c
@@ -67,6 +67,7 @@ count_files (notmuch_query_t *query)
return count;
}
+/* return 0 on success, -1 on failure */
static int
print_count (notmuch_database_t *notmuch, const char *query_str,
const char **exclude_tags, size_t exclude_tags_length, int output, int print_lastmod)
@@ -81,7 +82,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str,
query = notmuch_query_create (notmuch, query_str);
if (query == NULL) {
fprintf (stderr, "Out of memory\n");
- return 1;
+ return -1;
}
for (i = 0; i < exclude_tags_length; i++)