about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-10-29 10:44:57 +0100
committervan Hauser <vh@thc.org>2019-10-29 10:44:57 +0100
commitccbb0d37b33a83a0ea1bdb6128cb6c8900802944 (patch)
tree2dffc1607b1286700226873bfdcf3ca8252c25bf
parent66f123fb66ef99fc518e395929c86f8359f40dfb (diff)
downloadafl++-ccbb0d37b33a83a0ea1bdb6128cb6c8900802944.tar.gz
removed warning
-rw-r--r--libdislocator/libdislocator.so.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index e27efc0f..7fe40afa 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -270,10 +270,10 @@ void* realloc(void* ptr, size_t len) {
    a normal request */
 
 int posix_memalign(void** ptr, size_t align, size_t len) {
-   if ((char*)ptr == NULL || *ptr == NULL) 
-     return -1; // why would we do: FATAL("null pointer on posix_memalign()");
+   if (*ptr == NULL) 
+     return EINVAL;
    if ((align % 2) || (align % sizeof(void *)))
-     return EINVAL; // why would we do: FATAL("bad alignment on posix_memalign()");
+     return EINVAL;
    if (len == 0) {
      *ptr = NULL;
      return 0;