[rtems commit] posix: Fix unused result warning
Sebastian Huber
sebh at rtems.org
Fri Oct 12 12:41:18 UTC 2018
Module: rtems
Branch: master
Commit: c6023b75bb0c2c0814b26e3419cc9505fa99d36e
Changeset: http://git.rtems.org/rtems/commit/?id=c6023b75bb0c2c0814b26e3419cc9505fa99d36e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Oct 12 14:40:52 2018 +0200
posix: Fix unused result warning
---
cpukit/posix/src/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/posix/src/mmap.c b/cpukit/posix/src/mmap.c
index 9d9c063..de7d5b2 100644
--- a/cpukit/posix/src/mmap.c
+++ b/cpukit/posix/src/mmap.c
@@ -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;
More information about the vc
mailing list