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 51F4C6DE176A for ; Sat, 26 Sep 2015 19:52:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.111 X-Spam-Level: X-Spam-Status: No, score=0.111 tagged_above=-999 required=5 tests=[AWL=0.111] 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 rUrVp6WUJCq2 for ; Sat, 26 Sep 2015 19:52:43 -0700 (PDT) Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) by arlo.cworth.org (Postfix) with ESMTPS id 878D66DE0924 for ; Sat, 26 Sep 2015 19:52:43 -0700 (PDT) Received: from remotemail by gitolite.debian.net with local (Exim 4.80) (envelope-from ) id 1Zg24H-0005bv-LT; Sun, 27 Sep 2015 02:52:01 +0000 Received: (nullmailer pid 31133 invoked by uid 1000); Sun, 27 Sep 2015 02:50:26 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v3 1/4] cli/count: simplify and document return value of print_count Date: Sat, 26 Sep 2015 23:50:10 -0300 Message-Id: <1443322213-31075-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1443322213-31075-1-git-send-email-david@tethera.net> References: <1443322213-31075-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 02:52:45 -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