diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-20 06:29:19 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-20 06:29:19 +0900 |
commit | 6d946490ba835807327b36263c7a3b53653ca762 (patch) | |
tree | 09e06ebfbabb1f13fb9faa61314c87f82079e2a0 /src/locale/keymap-util.c | |
parent | f9dc94408d70dd2f44915f4c6d67dc498c1c6243 (diff) | |
download | systemd-6d946490ba835807327b36263c7a3b53653ca762.tar.gz |
tree-wide: drop alloca() in loop
Diffstat (limited to 'src/locale/keymap-util.c')
-rw-r--r-- | src/locale/keymap-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c index e238e5a124..c7dcd8ad38 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -648,11 +648,11 @@ int find_legacy_keymap(Context *c, char **ret) { if (startswith_comma(c->x11_layout, a[1])) matching = 5; else { - char *x; + _cleanup_free_ char *x = NULL; /* If that didn't work, strip off the * other layouts from the entry, too */ - x = strndupa(a[1], strcspn(a[1], ",")); + x = strndup(a[1], strcspn(a[1], ",")); if (startswith_comma(c->x11_layout, x)) matching = 1; } |