tree-wide: use newa() rather than alloca() where we can

This commit is contained in:
Lennart Poettering
2018-04-27 14:29:06 +02:00
parent 1232c44718
commit cf409d15fa
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ static void normalize_chain(CalendarComponent **c) {
if (n <= 1)
return;
j = b = alloca(sizeof(CalendarComponent*) * n);
j = b = newa(CalendarComponent*, n);
for (i = *c; i; i = i->next)
*(j++) = i;
+1 -1
View File
@@ -1433,7 +1433,7 @@ int fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret
va_end(ap);
/* Allocate strv */
l = alloca(sizeof(char *) * (n + 1));
l = newa(char*, n + 1);
/* Fill in arguments */
va_start(ap, path);