about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2019-10-28 16:32:26 +0100
committerhexcoder- <heiko@hexco.de>2019-10-28 16:32:26 +0100
commit80359685167309639562ece25a77782cb6ccfd54 (patch)
treee0481ebb6d9a1fdf5d9fe7664906710664c6148e
parentf9bf0bd90ed51d3d4e177e737598ece1e9c29773 (diff)
downloadafl++-80359685167309639562ece25a77782cb6ccfd54.tar.gz
silence some compiler warnings
-rw-r--r--libdislocator/libdislocator.so.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index f1972797..5246af40 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -279,7 +279,7 @@ int posix_memalign(void** ptr, size_t align, size_t len) {
 
    *ptr = malloc(len);
 
-   DEBUGF("posix_memalign(%p %zu, %zu)", ptr, len, align);
+   DEBUGF("posix_memalign(%p %zu, %zu)", ptr, align, len);
 
    return 0;
 }
@@ -287,9 +287,11 @@ int posix_memalign(void** ptr, size_t align, size_t len) {
 /* just the non-posix fashion */
 
 void *memalign(size_t align, size_t len) {
-   void* ret;
+   void* ret = NULL;
 
-   posix_memalign(&ret, align, len);
+   if (posix_memalign(&ret, align, len)) {
+     DEBUGF("memalign(%zu, %zu) failed", align, len);
+   }
 
    return ret;
 }