From: Blake Jones Date: Wed, 14 Nov 2012 02:10:03 +0000 (+1600) Subject: [PATCH v3 08/10] notmuch-config: use strchr(), not index() (Solaris support) X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=20ab3c388297b268579ec9b12438a62d3a75a96a;p=notmuch-archives.git [PATCH v3 08/10] notmuch-config: use strchr(), not index() (Solaris support) --- diff --git a/ce/59c2f02bc41d078aec30391452b8477f00927b b/ce/59c2f02bc41d078aec30391452b8477f00927b new file mode 100644 index 000000000..78ed63565 --- /dev/null +++ b/ce/59c2f02bc41d078aec30391452b8477f00927b @@ -0,0 +1,78 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id AA409431FBC + for ; Tue, 13 Nov 2012 18:10:13 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ldO9uYBzsuOj for ; + Tue, 13 Nov 2012 18:10:13 -0800 (PST) +Received: from foo.net (70-36-235-136.dsl.static.sonic.net [70.36.235.136]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C84FA431FC0 + for ; Tue, 13 Nov 2012 18:10:11 -0800 (PST) +Received: from foo.net (localhost [127.0.0.1]) + by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qAE2AAAX018932; + Tue, 13 Nov 2012 18:10:10 -0800 (PST) +Received: (from blakej@localhost) + by foo.net (8.14.5+Sun/8.14.5/Submit) id qAE2AAeX018927; + Tue, 13 Nov 2012 18:10:10 -0800 (PST) +From: Blake Jones +To: notmuch@notmuchmail.org +Subject: [PATCH v3 08/10] notmuch-config: use strchr(), + not index() (Solaris support) +Date: Tue, 13 Nov 2012 18:10:03 -0800 +Message-Id: <1352859005-18631-9-git-send-email-blakej@foo.net> +X-Mailer: git-send-email 1.7.3.2 +In-Reply-To: <1352859005-18631-1-git-send-email-blakej@foo.net> +References: <1352859005-18631-1-git-send-email-blakej@foo.net> +X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 + (foo.net [127.0.0.1]); Tue, 13 Nov 2012 18:10:10 -0800 (PST) +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Wed, 14 Nov 2012 02:10:13 -0000 + +notmuch-config.c has the only use of the function named "index()" in the +notmuch source. Several other places use the equivalent function +"strchr()"; this patch just fixes notmuch-config.c to use strchr() +instead. (Solaris needs to include to get the prototype for +index(), and notmuch-config.c was failing to include that header, so it +wasn't compiling as-is.) +--- + notmuch-config.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/notmuch-config.c b/notmuch-config.c +index 3e37a2d..47eb743 100644 +--- a/notmuch-config.c ++++ b/notmuch-config.c +@@ -688,7 +688,7 @@ _item_split (char *item, char **group, char **key) + + *group = item; + +- period = index (item, '.'); ++ period = strchr (item, '.'); + if (period == NULL || *(period+1) == '\0') { + fprintf (stderr, + "Invalid configuration name: %s\n" +-- +1.7.3.2 +