File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -170,14 +170,12 @@ static int nidmap_create(opal_pointer_array_t *pool, char **regex)
170170 len = strlen (node );
171171 startnum = -1 ;
172172 memset (prefix , 0 , ORTE_MAX_NODE_PREFIX );
173- numdigits = 0 ;
174173 for (i = 0 , j = 0 ; i < len ; i ++ ) {
175174 /* valid hostname characters are ascii letters, digits and the '-' character. */
176175 if (isdigit (node [i ])) {
177176 /* count the size of the numeric field - but don't
178177 * add the digits to the prefix
179178 */
180- numdigits ++ ;
181179 if (startnum < 0 ) {
182180 /* okay, this defines end of the prefix */
183181 startnum = i ;
@@ -204,8 +202,10 @@ static int nidmap_create(opal_pointer_array_t *pool, char **regex)
204202 nodenum = strtol (& node [startnum ], & sfx , 10 );
205203 if (NULL != sfx ) {
206204 suffix = strdup (sfx );
205+ numdigits = (int )(sfx - & node [startnum ]);
207206 } else {
208207 suffix = NULL ;
208+ numdigits = (int )strlen (& node [startnum ]);
209209 }
210210 /* is this node name already on our list? */
211211 found = false;
You can’t perform that action at this time.
0 commit comments