diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-04-12 23:10:21 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-04-14 12:25:06 +0100 |
commit | c2b2df604b845b4e1697d0911935e6644323c5a6 (patch) | |
tree | 010d290588b55b7ed97f9e3066f56f9a9d08d77d /src/locale/keymap-util.c | |
parent | be084c0dd1f1a06320e507c0e6a9de23b37556e1 (diff) | |
download | systemd-c2b2df604b845b4e1697d0911935e6644323c5a6.tar.gz |
tree-wide: avoid uninitialized warning on _cleanup_ variables
With some versions of the compiler, the _cleanup_ attr makes it think
the variable might be freed/closed when uninitialized, even though it
cannot happen. The added cost is small enough to be worth the benefit,
and optimized builds will help reduce it even further.
Diffstat (limited to 'src/locale/keymap-util.c')
-rw-r--r-- | src/locale/keymap-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c index e8de1b789a..d2f0566dbc 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -535,7 +535,7 @@ int vconsole_convert_to_x11(Context *c) { int find_converted_keymap(const char *x11_layout, const char *x11_variant, char **new_keymap) { const char *dir; - _cleanup_free_ char *n; + _cleanup_free_ char *n = NULL; if (x11_variant) n = strjoin(x11_layout, "-", x11_variant); |