File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11/*
22 * Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
33 * Copyright (c) 2016 IBM Corporation. All rights reserved.
4+ * Copyright (c) 2018 Research Organization for Information Science
5+ * and Technology (RIST). All rights reserved.
46 *
57 * $COPYRIGHT$
68 *
@@ -106,7 +108,6 @@ static pmix_status_t generate_node_regex(const char *input,
106108 len = strlen (vptr );
107109 startnum = -1 ;
108110 memset (prefix , 0 , PMIX_MAX_NODE_PREFIX );
109- numdigits = 0 ;
110111 for (i = 0 , j = 0 ; i < len ; i ++ ) {
111112 if (!isalpha (vptr [i ])) {
112113 /* found a non-alpha char */
@@ -120,7 +121,6 @@ static pmix_status_t generate_node_regex(const char *input,
120121 /* count the size of the numeric field - but don't
121122 * add the digits to the prefix
122123 */
123- numdigits ++ ;
124124 if (startnum < 0 ) {
125125 /* okay, this defines end of the prefix */
126126 startnum = i ;
@@ -147,8 +147,10 @@ static pmix_status_t generate_node_regex(const char *input,
147147 vnum = strtol (& vptr [startnum ], & sfx , 10 );
148148 if (NULL != sfx ) {
149149 suffix = strdup (sfx );
150+ numdigits = (int )(sfx - & vptr [startnum ]);
150151 } else {
151152 suffix = NULL ;
153+ numdigits = (int )strlen (& vptr [startnum ]);
152154 }
153155 /* is this value already on our list? */
154156 found = false;
You can’t perform that action at this time.
0 commit comments