all: minor cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2024-05-11 22:07:08 +02:00
parent cba44c45fc
commit ed3d7b0c45
5 changed files with 45 additions and 20 deletions
+1 -2
View File
@@ -78,8 +78,7 @@ void xspan_check_range(const void *ptr, const void *base, ptrdiff_t size_in_byte
xspan_fail_range_nullbase();
#if defined(__SANITIZE_ADDRESS__) || 1
// info: pointers are out of range deliberately during internal doctest checks; see dt_xspan.cpp
ACC_COMPILE_TIME_ASSERT(sizeof(intptr_t) == sizeof(upx_ptraddr_t))
const intptr_t off = ptr_get_address(ptr) - ptr_get_address(base);
const upx_sptraddr_t off = ptr_get_address(ptr) - ptr_get_address(base);
#else
const ptrdiff_t off = (const charptr) ptr - (const charptr) base;
#endif