diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-01-26 15:52:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-01-26 16:17:04 +0100 |
commit | 6e9417f5b4f29938fab1eee2b5edf596cc580452 (patch) | |
tree | b49d45cde1c5f687948c95a87093353220296ef3 /src/basic/path-util.h | |
parent | 4aee28c67b48f53b521e5512fc648f4ba2afabfb (diff) | |
download | systemd-6e9417f5b4f29938fab1eee2b5edf596cc580452.tar.gz |
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.
Diffstat (limited to 'src/basic/path-util.h')
-rw-r--r-- | src/basic/path-util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/path-util.h b/src/basic/path-util.h index 094aa47c01..86c5a577cb 100644 --- a/src/basic/path-util.h +++ b/src/basic/path-util.h @@ -131,7 +131,7 @@ char *prefix_root(const char *root, const char *path); _ret = _path; \ else { \ _l = strlen(_root) + 1 + strlen(_path) + 1; \ - _n = alloca(_l); \ + _n = newa(char, _l); \ _p = stpcpy(_n, _root); \ while (_p > _n && _p[-1] == '/') \ _p--; \ |