ntdll: Avoid comparing the result of pointer arithmetic to zero.
commit539ef7c462852cf9b528e9d7b8fc6999ed8d5f2d
authorZebediah Figura <zfigura@codeweavers.com>
Sun, 11 Sep 2022 22:58:45 +0000 (11 17:58 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 16 Sep 2022 17:12:49 +0000 (16 19:12 +0200)
tree1e878cea3ff30f456ac807ffaac869e216308f89
parent5965771a9c8213eb85079dc3efa02609dfe75855
ntdll: Avoid comparing the result of pointer arithmetic to zero.

gcc warns about this:

../wine/dlls/ntdll/unix/virtual.c: In function ‘mmap_add_reserved_area’:
../wine/dlls/ntdll/unix/virtual.c:241:9: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘(char *)addr + (sizetype)size’ must not be NULL [-Werror=address]
  241 |     if (!((char *)addr + size)) size--;  /* avoid wrap-around */
      |         ^
dlls/ntdll/unix/virtual.c