mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [46/51] [abbrv] incubator-mynewt-larva git commit: Use local variable for name separator in conf_parse_name().
Date Wed, 17 Feb 2016 15:53:28 GMT
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 <marko@runtime.io>
Authored: Tue Feb 16 16:31:40 2016 -0800
Committer: Marko Kiiskila <marko@runtime.io>
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;
 


Mime
View raw message