diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-09 17:34:46 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-09 17:57:34 +0200 |
commit | 130d3d22e97114fc0b9c685aa8db437454a10635 (patch) | |
tree | cbf9c6aff9349f07b8cc23371191f3ceb5f1c699 /src/locale/keymap-util.c | |
parent | time-util: fix indentation for comments (diff) | |
download | systemd-130d3d22e97114fc0b9c685aa8db437454a10635.tar.xz systemd-130d3d22e97114fc0b9c685aa8db437454a10635.zip |
tree-wide: use strv_free_and_replace() macro
Diffstat (limited to 'src/locale/keymap-util.c')
-rw-r--r-- | src/locale/keymap-util.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c index 5e38061f51..09bd449925 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -250,8 +250,7 @@ int locale_write_data(Context *c, char ***settings) { if (!u) return -ENOMEM; - strv_free(l); - l = u; + strv_free_and_replace(l, u); } if (strv_isempty(l)) { @@ -291,8 +290,7 @@ int vconsole_write_data(Context *c) { if (!u) return -ENOMEM; - strv_free(l); - l = u; + strv_free_and_replace(l, u); } if (isempty(c->vc_keymap_toggle)) @@ -309,8 +307,7 @@ int vconsole_write_data(Context *c) { if (!u) return -ENOMEM; - strv_free(l); - l = u; + strv_free_and_replace(l, u); } if (strv_isempty(l)) { |