posix: Fix unused result warning

This commit is contained in:
Sebastian Huber
2018-10-12 14:40:52 +02:00
parent 9d1f17a9ca
commit c6023b75bb

View File

@@ -219,8 +219,8 @@ void *mmap(
} else if ( map_private ) {
/* private mappings of shared memory do not need special treatment. */
is_shared_shm = false;
posix_memalign( &mapping->addr, PAGE_SIZE, len );
if ( !mapping->addr ) {
err = posix_memalign( &mapping->addr, PAGE_SIZE, len );
if ( err != 0 ) {
free( mapping );
errno = ENOMEM;
return MAP_FAILED;