tree-wide: use newa() rather than alloca() where we can
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user