8340596: Remove dead code from RequiresSetenv function in java.base/unix/native/libjli/java_md.c

Reviewed-by: dholmes
This commit is contained in:
Jaikiran Pai 2024-09-24 02:08:20 +00:00
parent 3411f9dff7
commit 865d99f634

@ -211,7 +211,6 @@ static jboolean
RequiresSetenv(const char *jvmpath) {
char jpath[PATH_MAX + 1];
char *llp;
char *dmllp = NULL;
char *p; /* a utility pointer */
#ifdef MUSL_LIBC
@ -229,7 +228,7 @@ RequiresSetenv(const char *jvmpath) {
llp = getenv("LD_LIBRARY_PATH");
/* no environment variable is a good environment variable */
if (llp == NULL && dmllp == NULL) {
if (llp == NULL) {
return JNI_FALSE;
}
#ifdef __linux
@ -268,9 +267,6 @@ RequiresSetenv(const char *jvmpath) {
if (llp != NULL && ContainsLibJVM(llp)) {
return JNI_TRUE;
}
if (dmllp != NULL && ContainsLibJVM(dmllp)) {
return JNI_TRUE;
}
return JNI_FALSE;
}
#endif /* SETENV_REQUIRED */