Skip to content

Commit 817e3f9

Browse files
committed
Replace constant 8 with SIZE_OF_LONG
1 parent 75a467b commit 817e3f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static boolean anySet(Object baseObject, long baseOffset, long bitSetWidt
7575
assert bitSetWidthInBytes % SIZE_OF_LONG == 0;
7676
int widthInLong = (int)(bitSetWidthInBytes / SIZE_OF_LONG);
7777
long addr = baseOffset;
78-
for (int i = 0; i <= widthInLong; i++, addr += 8) {
78+
for (int i = 0; i <= widthInLong; i++, addr += SIZE_OF_LONG) {
7979
if (PlatformDependent.UNSAFE.getLong(baseObject, addr) != 0) {
8080
return true;
8181
}

0 commit comments

Comments
 (0)