commit | 6e9417f5b4f29938fab1eee2b5edf596cc580452 | [log] [tgz] |
---|---|---|
author | Lennart Poettering <lennart@poettering.net> | Sat Jan 26 15:52:18 2019 +0100 |
committer | Lennart Poettering <lennart@poettering.net> | Sat Jan 26 16:17:04 2019 +0100 |
tree | b49d45cde1c5f687948c95a87093353220296ef3 | |
parent | 4aee28c67b48f53b521e5512fc648f4ba2afabfb [diff] [blame] |
tree-wide: use newa() instead of alloca() wherever we can Typesafety is nice. And this way we can take benefit of the new size assert() the previous commit added.
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 03a9e1d..b66765b 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c
@@ -3130,7 +3130,7 @@ return 0; path = a->items[0].path; - prefix = alloca(strlen(path) + 1); + prefix = newa(char, strlen(path) + 1); PATH_FOREACH_PREFIX(prefix, path) { ItemArray *j;