[Patch v3 1/4] cli/count: simplify and document return value of print_count
authorDavid Bremner <david@tethera.net>
Sun, 27 Sep 2015 02:50:10 +0000 (23:50 +2100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:39 +0000 (14:49 -0700)
1f/fb03062dedd27b468e7cc66a17f8134afdae4e [new file with mode: 0644]

diff --git a/1f/fb03062dedd27b468e7cc66a17f8134afdae4e b/1f/fb03062dedd27b468e7cc66a17f8134afdae4e
new file mode 100644 (file)
index 0000000..e220131
--- /dev/null
@@ -0,0 +1,76 @@
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 51F4C6DE176A\r
+ for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 19:52:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.111\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.111 tagged_above=-999 required=5 tests=[AWL=0.111]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id rUrVp6WUJCq2 for <notmuch@notmuchmail.org>;\r
+ Sat, 26 Sep 2015 19:52:43 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 878D66DE0924\r
+ for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 19:52:43 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1Zg24H-0005bv-LT; Sun, 27 Sep 2015 02:52:01 +0000\r
+Received: (nullmailer pid 31133 invoked by uid 1000); Sun, 27 Sep 2015\r
+ 02:50:26 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [Patch v3 1/4] cli/count: simplify and document return value of\r
+ print_count\r
+Date: Sat, 26 Sep 2015 23:50:10 -0300\r
+Message-Id: <1443322213-31075-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.5.3\r
+In-Reply-To: <1443322213-31075-1-git-send-email-david@tethera.net>\r
+References: <1443322213-31075-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 27 Sep 2015 02:52:45 -0000\r
+\r
+Essentially a cosmetic change.\r
+---\r
+ notmuch-count.c | 3 ++-\r
+ 1 file changed, 2 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/notmuch-count.c b/notmuch-count.c\r
+index 09613e6..be3e236 100644\r
+--- a/notmuch-count.c\r
++++ b/notmuch-count.c\r
+@@ -67,6 +67,7 @@ count_files (notmuch_query_t *query)\r
+     return count;\r
+ }\r
\r
++/* return 0 on success, -1 on failure */\r
+ static int\r
+ print_count (notmuch_database_t *notmuch, const char *query_str,\r
+            const char **exclude_tags, size_t exclude_tags_length, int output, int print_lastmod)\r
+@@ -81,7 +82,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str,\r
+     query = notmuch_query_create (notmuch, query_str);\r
+     if (query == NULL) {\r
+       fprintf (stderr, "Out of memory\n");\r
+-      return 1;\r
++      return -1;\r
+     }\r
\r
+     for (i = 0; i < exclude_tags_length; i++)\r
+-- \r
+2.5.3\r
+\r