[PATCH 05/11] A pointer to a pointer is nonnull.
Peter Foley
pefoley2@pefoley.com
Sat Mar 19 17:46:00 GMT 2016
GCC 6.0+ can assert that this argument is nonnull.
Remove the unnecessary check to fix a warning.
winsup/cygwin/ChangeLog
malloc_wrapper.cc (posix_memalign): Remove always true nonnull check.
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
---
winsup/cygwin/malloc_wrapper.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index 43b8144..0db5de8 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -126,8 +126,7 @@ posix_memalign (void **memptr, size_t alignment, size_t bytes)
__malloc_unlock ();
if (!res)
return ENOMEM;
- if (memptr)
- *memptr = res;
+ *memptr = res;
return 0;
}
--
2.7.4
More information about the Cygwin-patches
mailing list