summaryrefslogtreecommitdiffstats
path: root/src/locale/keymap-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-07-21 10:35:45 +0200
committerGitHub <noreply@github.com>2017-07-21 10:35:45 +0200
commit4b61c8751135c58be043d86b9fef4c8ec7aadf18 (patch)
tree5a0686acb073a0b21620501c7fcf273b0791883c /src/locale/keymap-util.c
parentMerge pull request #6413 from poettering/getpid (diff)
downloadsystemd-4b61c8751135c58be043d86b9fef4c8ec7aadf18.tar.xz
systemd-4b61c8751135c58be043d86b9fef4c8ec7aadf18.zip
tree-wide: fput[cs]() → fput[cs]_unlocked() wherever that makes sense (#6396)
As a follow-up for db3f45e2d2586d78f942a43e661415bc50716d11 let's do the same for all other cases where we create a FILE* with local scope and know that no other threads hence can have access to it. For most cases this shouldn't change much really, but this should speed dbus introspection and calender time formatting up a bit.
Diffstat (limited to 'src/locale/keymap-util.c')
-rw-r--r--src/locale/keymap-util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
index 105d9b0ee4..ec48e8ba6d 100644
--- a/src/locale/keymap-util.c
+++ b/src/locale/keymap-util.c
@@ -361,12 +361,12 @@ int x11_write_data(Context *c) {
fchmod(fileno(f), 0644);
- fputs("# Written by systemd-localed(8), read by systemd-localed and Xorg. It's\n"
- "# probably wise not to edit this file manually. Use localectl(1) to\n"
- "# instruct systemd-localed to update it.\n"
- "Section \"InputClass\"\n"
- " Identifier \"system-keyboard\"\n"
- " MatchIsKeyboard \"on\"\n", f);
+ fputs_unlocked("# Written by systemd-localed(8), read by systemd-localed and Xorg. It's\n"
+ "# probably wise not to edit this file manually. Use localectl(1) to\n"
+ "# instruct systemd-localed to update it.\n"
+ "Section \"InputClass\"\n"
+ " Identifier \"system-keyboard\"\n"
+ " MatchIsKeyboard \"on\"\n", f);
if (!isempty(c->x11_layout))
fprintf(f, " Option \"XkbLayout\" \"%s\"\n", c->x11_layout);
@@ -380,7 +380,7 @@ int x11_write_data(Context *c) {
if (!isempty(c->x11_options))
fprintf(f, " Option \"XkbOptions\" \"%s\"\n", c->x11_options);
- fputs("EndSection\n", f);
+ fputs_unlocked("EndSection\n", f);
r = fflush_and_check(f);
if (r < 0)