Minor cleanups.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-10-09 03:12:19 +02:00
parent 554f8a376c
commit 22178f2224
3 changed files with 6 additions and 14 deletions
+2 -2
View File
@@ -76,11 +76,11 @@ bool mem_size_valid_bytes(upx_uint64_t bytes)
}
int ptr_diff(const char *p1, const char *p2)
int ptr_diff(const void *p1, const void *p2)
{
assert(p1 != NULL);
assert(p2 != NULL);
ptrdiff_t d = p1 - p2;
ptrdiff_t d = (const char *)p1 - (const char *)p2;
if (p1 >= p2)
assert(mem_size_valid_bytes(d));
else