6798822: (process) Non-portable use of isdigit in src/solaris/native/java/lang/UNIXProcess_md.c
Reviewed-by: alanb
This commit is contained in:
parent
2f243ad874
commit
40754a9924
@ -259,6 +259,12 @@ Java_java_lang_UNIXProcess_waitForProcessExit(JNIEnv* env,
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
isAsciiDigit(char c)
|
||||
{
|
||||
return c >= '0' && c <= '9';
|
||||
}
|
||||
|
||||
static int
|
||||
closeDescriptors(void)
|
||||
{
|
||||
@ -284,7 +290,7 @@ closeDescriptors(void)
|
||||
*/
|
||||
while ((dirp = readdir64(dp)) != NULL) {
|
||||
int fd;
|
||||
if (isdigit(dirp->d_name[0]) &&
|
||||
if (isAsciiDigit(dirp->d_name[0]) &&
|
||||
(fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2)
|
||||
close(fd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user