projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix posix_memalign() return value in case of error
[fio.git]
/
helpers.c
diff --git
a/helpers.c
b/helpers.c
index 987f5b683bb08c0014fb17eae1b1099b3754f722..ba5c654e3b33bf0289422d3561fc5302f36ccce3 100644
(file)
--- a/
helpers.c
+++ b/
helpers.c
@@
-6,7
+6,10
@@
int __weak posix_memalign(void **ptr, size_t align, size_t size)
{
*ptr = memalign(align, size);
int __weak posix_memalign(void **ptr, size_t align, size_t size)
{
*ptr = memalign(align, size);
- return *ptr == NULL;
+ if (*ptr)
+ return 0;
+
+ return ENOMEM;
}
int __weak posix_fallocate(int fd, off_t offset, off_t len)
}
int __weak posix_fallocate(int fd, off_t offset, off_t len)