Skip to content

Commit 18762dd

Browse files
VSadovjkotas
andcommitted
Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
1 parent b3656ca commit 18762dd

File tree

1 file changed

+1
-2
lines changed
  • src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading

1 file changed

+1
-2
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ internal static unsafe int CompareExchange(int* location1, int value, int compar
3636
#if TARGET_X86 || TARGET_AMD64 || TARGET_ARM64 || TARGET_RISCV64
3737
return CompareExchange(location1, value, comparand); // Must expand intrinsic
3838
#else
39-
// test readability of the location
40-
_ = *location1;
39+
Debug.Assert(location1 != null);
4140
return RuntimeImports.InterlockedCompareExchange(location1, value, comparand);
4241
#endif
4342
}

0 commit comments

Comments
 (0)