aboutsummaryrefslogtreecommitdiffstats
path: root/aligned_wcsndup.c
diff options
context:
space:
mode:
Diffstat (limited to 'aligned_wcsndup.c')
-rw-r--r--aligned_wcsndup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aligned_wcsndup.c b/aligned_wcsndup.c
index f3fbf23..1839316 100644
--- a/aligned_wcsndup.c
+++ b/aligned_wcsndup.c
@@ -7,10 +7,10 @@ wchar_t *
libsimple_aligned_wcsndup(const wchar_t *s, size_t alignment, size_t n)
{
size_t size;
- void *ret;
+ wchar_t *ret;
if (LIBSIMPLE_UMUL_OVERFLOW_NONZERO(n + 1, sizeof(wchar_t), &size, SIZE_MAX)) {
errno = ENOMEM;
- enprintf(status, "wcsdup:");
+ return NULL;
}
size = size + (alignment - size % alignment) % alignment;
ret = aligned_alloc(alignment, size);