diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-21 10:35:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-21 10:35:45 +0200 |
commit | 4b61c8751135c58be043d86b9fef4c8ec7aadf18 (patch) | |
tree | 5a0686acb073a0b21620501c7fcf273b0791883c /src/locale/keymap-util.c | |
parent | Merge pull request #6413 from poettering/getpid (diff) | |
download | systemd-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.c | 14 |
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) |