Return-Path: X-Original-To: apmail-mynewt-commits-archive@minotaur.apache.org Delivered-To: apmail-mynewt-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5F921829C for ; Wed, 17 Feb 2016 18:17:46 +0000 (UTC) Received: (qmail 75790 invoked by uid 500); 17 Feb 2016 18:17:46 -0000 Delivered-To: apmail-mynewt-commits-archive@mynewt.apache.org Received: (qmail 75761 invoked by uid 500); 17 Feb 2016 18:17:46 -0000 Mailing-List: contact commits-help@mynewt.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mynewt.incubator.apache.org Delivered-To: mailing list commits@mynewt.incubator.apache.org Received: (qmail 75751 invoked by uid 99); 17 Feb 2016 18:17:46 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2016 18:17:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4EED8C0DA6 for ; Wed, 17 Feb 2016 18:17:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.549 X-Spam-Level: X-Spam-Status: No, score=-3.549 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7Key3ktt8x_D for ; Wed, 17 Feb 2016 18:17:45 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 436D2677A9 for ; Wed, 17 Feb 2016 15:52:46 +0000 (UTC) Received: (qmail 428 invoked by uid 99); 17 Feb 2016 15:52:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2016 15:52:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6F2C9E35D6; Wed, 17 Feb 2016 15:52:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: marko@apache.org To: commits@mynewt.incubator.apache.org Date: Wed, 17 Feb 2016 15:53:28 -0000 Message-Id: <77cb8e3bd1f34c9aa77cdb01b3bae4f9@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [46/51] [abbrv] incubator-mynewt-larva git commit: Use local variable for name separator in conf_parse_name(). Use local variable for name separator in conf_parse_name(). Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/ce918045 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/ce918045 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/ce918045 Branch: refs/heads/develop Commit: ce918045b8993f5d2d2feff14bc75f7df24cb7d4 Parents: 39ec452 Author: Marko Kiiskila Authored: Tue Feb 16 16:31:40 2016 -0800 Committer: Marko Kiiskila Committed: Tue Feb 16 16:31:40 2016 -0800 ---------------------------------------------------------------------- sys/config/src/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/ce918045/sys/config/src/config.c ---------------------------------------------------------------------- diff --git a/sys/config/src/config.c b/sys/config/src/config.c index e11b260..5586896 100644 --- a/sys/config/src/config.c +++ b/sys/config/src/config.c @@ -85,15 +85,15 @@ conf_parse_name(char *name, int *name_argc, char *name_argv[]) { char *tok; char *tok_ptr; + char *sep = CONF_NAME_SEPARATOR; int i; - tok_ptr = NULL; - tok = strtok_r(name, CONF_NAME_SEPARATOR, &tok_ptr); + tok = strtok_r(name, sep, &tok_ptr); i = 0; while (tok) { name_argv[i++] = tok; - tok = strtok_r(NULL, CONF_NAME_SEPARATOR, &tok_ptr); + tok = strtok_r(NULL, sep, &tok_ptr); } *name_argc = i;