Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/include/stdlib.h2
-rw-r--r--winsup/cygwin/malloc_wrapper.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index f4b262698..7d4ae76f4 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -253,7 +253,7 @@ int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
#ifdef __rtems__
#if __POSIX_VISIBLE >= 200112
-int _EXFUN(posix_memalign,(void **, size_t, size_t));
+int _EXFUN(__nonnull (1) posix_memalign,(void **, size_t, size_t));
#endif
#endif
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index 43b8144b2..0db5de839 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -126,8 +126,7 @@ posix_memalign (void **memptr, size_t alignment, size_t bytes)
__malloc_unlock ();
if (!res)
return ENOMEM;
- if (memptr)
- *memptr = res;
+ *memptr = res;
return 0;
}