diff options
author | Franck Bui <fbui@suse.com> | 2023-04-19 20:54:13 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2023-04-24 14:12:58 +0200 |
commit | 3c7012cdda46f82324bb5a2ead86a6974bba8b91 (patch) | |
tree | 6f8d5cc037aa4a765890bf44c32f873523a68764 /src/locale | |
parent | Merge pull request #27367 from bluca/mkosi_resolve (diff) | |
download | systemd-3c7012cdda46f82324bb5a2ead86a6974bba8b91.tar.xz systemd-3c7012cdda46f82324bb5a2ead86a6974bba8b91.zip |
localed-util: make use of strdupcspn()
Diffstat (limited to 'src/locale')
-rw-r--r-- | src/locale/localed-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/localed-util.c b/src/locale/localed-util.c index 17d96aea1d..65b6108e4e 100644 --- a/src/locale/localed-util.c +++ b/src/locale/localed-util.c @@ -817,12 +817,12 @@ int find_legacy_keymap(const X11Context *xc, char **ret) { * matches just the first layout. */ - l = strndup(xc->layout, strcspn(xc->layout, ",")); + l = strdupcspn(xc->layout, ","); if (!l) return -ENOMEM; if (!isempty(xc->variant)) { - v = strndup(xc->variant, strcspn(xc->variant, ",")); + v = strdupcspn(xc->variant, ","); if (!v) return -ENOMEM; } |