File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1515 * Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1616 * Copyright (c) 2014-2017 Research Organization for Information Science
1717 * and Technology (RIST). All rights reserved.
18+ * Copyright (c) 2018 IBM Corporation. All rights reserved.
1819 * $COPYRIGHT$
1920 *
2021 * Additional copyrights may follow
@@ -268,14 +269,12 @@ int orte_util_nidmap_create(opal_pointer_array_t *pool, char **regex)
268269 len = strlen (node );
269270 startnum = -1 ;
270271 memset (prefix , 0 , ORTE_MAX_NODE_PREFIX );
271- numdigits = 0 ;
272272 for (i = 0 , j = 0 ; i < len ; i ++ ) {
273273 /* valid hostname characters are ascii letters, digits and the '-' character. */
274274 if (isdigit (node [i ])) {
275275 /* count the size of the numeric field - but don't
276276 * add the digits to the prefix
277277 */
278- numdigits ++ ;
279278 if (startnum < 0 ) {
280279 /* okay, this defines end of the prefix */
281280 startnum = i ;
@@ -302,8 +301,10 @@ int orte_util_nidmap_create(opal_pointer_array_t *pool, char **regex)
302301 nodenum = strtol (& node [startnum ], & sfx , 10 );
303302 if (NULL != sfx ) {
304303 suffix = strdup (sfx );
304+ numdigits = (int )(sfx - & node [startnum ]);
305305 } else {
306306 suffix = NULL ;
307+ numdigits = (int )strlen (& node [startnum ]);
307308 }
308309 /* is this node name already on our list? */
309310 found = false;
You can’t perform that action at this time.
0 commit comments