From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7F2D8431FC2 for ; Mon, 5 Nov 2012 11:02:29 -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 JiFXnYSUZR7F for ; Mon, 5 Nov 2012 11:02:28 -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 8F285429E34 for ; Mon, 5 Nov 2012 11:02:25 -0800 (PST) Received: from foo.net (localhost [127.0.0.1]) by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qA5J2OV8019134; Mon, 5 Nov 2012 11:02:24 -0800 (PST) Received: (from blakej@localhost) by foo.net (8.14.5+Sun/8.14.5/Submit) id qA5J2N0j019133; Mon, 5 Nov 2012 11:02:24 -0800 (PST) From: Blake Jones To: notmuch@notmuchmail.org Subject: [PATCH v2 08/10] notmuch-config: use strchr(), not index() (Solaris support) Date: Mon, 5 Nov 2012 11:02:01 -0800 Message-Id: <1352142123-18286-9-git-send-email-blakej@foo.net> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1352142123-18286-1-git-send-email-blakej@foo.net> References: <1352142123-18286-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]); Mon, 05 Nov 2012 11:02:24 -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: Mon, 05 Nov 2012 19:02:30 -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