/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-***/
#include <errno.h>
#include <fcntl.h>
assert_return(iov, -EINVAL);
assert_return(n > 0, -EINVAL);
- niov = alloca(sizeof(struct iovec) * (n + 3));
+ niov = newa(struct iovec, n + 3);
memcpy(niov, iov, sizeof(struct iovec) * n);
ALLOCA_CODE_FUNC(f, func);