Skip to content

Commit

Permalink
Fix variable names for parsing -XX:[+/-]UseZlibNX on AIX
Browse files Browse the repository at this point in the history
Related to #664

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
  • Loading branch information
pshipton committed Sep 21, 2023
1 parent e827101 commit 906dfc1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/java.base/unix/native/libjli/java_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,18 +382,18 @@ CreateExecutionEnvironment(int *pargc, char ***pargv,
*/

#ifdef AIX
int argc = *pargc - 1; // skip the launcher name
char **argv = *pargv + 1;
const char *arg = NULL;
int aixargc = *pargc - 1; // skip the launcher name
char **aixargv = *pargv + 1;
const char *aixarg = NULL;
jboolean useZlibNX = JNI_TRUE;
while (argc > 0 && *(arg = *argv) == '-') {
if (JLI_StrCmp(arg, "-XX:+UseZlibNX") == 0) {
while (aixargc > 0 && *(aixarg = *aixargv) == '-') {
if (JLI_StrCmp(aixarg, "-XX:+UseZlibNX") == 0) {
useZlibNX = JNI_TRUE;
} else if (JLI_StrCmp(arg, "-XX:-UseZlibNX") == 0) {
} else if (JLI_StrCmp(aixarg, "-XX:-UseZlibNX") == 0) {
useZlibNX = JNI_FALSE;
}
argc--;
argv++;
aixargc--;
aixargv++;
}
useZlibNX = useZlibNX && power_9_andup() && power_nx_gzip();
if (JLI_IsTraceLauncher()) {
Expand Down

0 comments on commit 906dfc1

Please sign in to comment.