Changeset 3722 for branches/libc-0.6/src
- Timestamp:
- Mar 17, 2011, 10:33:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/malloc/posix_memalign.c
r2254 r3722 31 31 #include <stdlib.h> 32 32 #include <stddef.h> 33 #include <errno.h> 33 34 #include <umalloc.h> 34 35 #include <emx/umalloc.h> … … 59 60 */ 60 61 *memptr = NULL; /* touch it so we crash here. */ 61 /** @todo verify that alignment is a power of 2 */ 62 if ( (alignment & (alignment - 1)) != 0 63 || alignment < sizeof(void *)) 64 { 65 errno = EINVAL; 66 LIBCLOG_ERROR_RETURN_INT(-1); 67 } 62 68 63 69 /* … … 69 75 assert(Heap->magic == _UM_MAGIC_HEAP); 70 76 if (Heap->magic != _UM_MAGIC_HEAP) 77 { 78 errno = EDOOFUS; 71 79 LIBCLOG_ERROR_RETURN_INT(-1); 80 } 72 81 73 82 /* … … 87 96 if (pv) 88 97 LIBCLOG_RETURN_INT(0); 98 errno = ENOMEM; 89 99 LIBCLOG_ERROR_RETURN_INT(-1); 90 100 }
Note:
See TracChangeset
for help on using the changeset viewer.