File tree 1 file changed +10
-10
lines changed 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -270,22 +270,15 @@ int orte_util_nidmap_create(opal_pointer_array_t *pool, char **regex)
270
270
}
271
271
}
272
272
node = nptr -> name ;
273
- /* determine this node's prefix by looking for first non-alpha char */
273
+ /* determine this node's prefix by looking for first digit char */
274
274
fullname = false;
275
275
len = strlen (node );
276
276
startnum = -1 ;
277
277
memset (prefix , 0 , ORTE_MAX_NODE_PREFIX );
278
278
numdigits = 0 ;
279
279
for (i = 0 , j = 0 ; i < len ; i ++ ) {
280
- if (!isalpha (node [i ])) {
281
- /* found a non-alpha char */
282
- if (!isdigit (node [i ])) {
283
- /* if it is anything but a digit, we just use
284
- * the entire name
285
- */
286
- fullname = true;
287
- break ;
288
- }
280
+ /* valid hostname characters are ascii letters, digits and the '-' character. */
281
+ if (isdigit (node [i ])) {
289
282
/* count the size of the numeric field - but don't
290
283
* add the digits to the prefix
291
284
*/
@@ -296,6 +289,13 @@ int orte_util_nidmap_create(opal_pointer_array_t *pool, char **regex)
296
289
}
297
290
continue ;
298
291
}
292
+ if ('.' == node [i ]) {
293
+ /* just use the entire name */
294
+ fullname = true;
295
+ break ;
296
+ }
297
+ /* this is either an alpha or '-' */
298
+ assert (isalpha (node [i ]) || '-' == node [i ]);
299
299
if (startnum < 0 ) {
300
300
prefix [j ++ ] = node [i ];
301
301
}
You can’t perform that action at this time.
0 commit comments