From 81de750a91247508717193821d87539a06496687 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 28 Sep 2015 12:31:56 +2100 Subject: [PATCH] [Patch v4 2/9] cli/count: simplify and document return value of print_count --- 59/40700ab948a63934abacf07e622f07f7149e84 | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 59/40700ab948a63934abacf07e622f07f7149e84 diff --git a/59/40700ab948a63934abacf07e622f07f7149e84 b/59/40700ab948a63934abacf07e622f07f7149e84 new file mode 100644 index 000000000..116c8c135 --- /dev/null +++ b/59/40700ab948a63934abacf07e622f07f7149e84 @@ -0,0 +1,76 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 036686DE14FD + for ; Sun, 27 Sep 2015 08:36:03 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.107 +X-Spam-Level: +X-Spam-Status: No, score=0.107 tagged_above=-999 required=5 tests=[AWL=0.107] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id sOsBEpbWofPc for ; + Sun, 27 Sep 2015 08:36:01 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 468866DE14D9 + for ; Sun, 27 Sep 2015 08:36:01 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZgDyx-0008Fz-Em; Sun, 27 Sep 2015 15:35:19 +0000 +Received: (nullmailer pid 11931 invoked by uid 1000); Sun, 27 Sep 2015 + 15:32:11 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v4 2/9] cli/count: simplify and document return value of + print_count +Date: Sun, 27 Sep 2015 12:31:56 -0300 +Message-Id: <1443367923-11867-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.5.3 +In-Reply-To: <1443367923-11867-1-git-send-email-david@tethera.net> +References: <1443367923-11867-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 27 Sep 2015 15:36:03 -0000 + +Essentially a cosmetic change. +--- + notmuch-count.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/notmuch-count.c b/notmuch-count.c +index 09613e6..be3e236 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++) +-- +2.5.3 + -- 2.26.2