Skip to content

Commit

Permalink
Merge pull request #18261 from dylanjtuttle/tautologicalCompare
Browse files Browse the repository at this point in the history
Eliminate tautological comparisons
  • Loading branch information
hzongaro authored Oct 31, 2023
2 parents 1a3b424 + 7be404a commit edd7fc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/compiler/control/J9Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ void J9::Options::preProcessMode(J9JavaVM *vm, J9JITConfig *jitConfig)
{
UDATA aggressivenessValue = 0;
IDATA ret = GET_INTEGER_VALUE(argIndex, aggressiveOption, aggressivenessValue);
if (ret == OPTION_OK && aggressivenessValue >= 0)
if (ret == OPTION_OK && aggressivenessValue < LAST_AGGRESSIVENESS_LEVEL)
{
_aggressivenessLevel = aggressivenessValue;
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/env/VMJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6602,9 +6602,9 @@ TR_J9VMBase::getInstanceFieldOffset(TR_OpaqueClassBlock * clazz, char * fieldNam
TR_OpaqueClassBlock *
TR_J9VM::getSuperClass(TR_OpaqueClassBlock * classPointer)
{
J9Class * clazz = TR::Compiler->cls.convertClassOffsetToClassPtr(classPointer);
UDATA classDepth = J9CLASS_DEPTH(clazz) - 1;
return convertClassPtrToClassOffset(classDepth >= 0 ? clazz->superclasses[classDepth]: 0);
J9Class *clazz = TR::Compiler->cls.convertClassOffsetToClassPtr(classPointer);
UDATA classDepth = J9CLASS_DEPTH(clazz);
return convertClassPtrToClassOffset(classDepth >= 1 ? clazz->superclasses[classDepth - 1] : 0);
}

bool
Expand Down

0 comments on commit edd7fc3

Please sign in to comment.