diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-08-10 17:25:59 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-08-13 06:54:56 +0200 |
commit | 022a19c9f69ae7d5fdc283711d111886047d4285 (patch) | |
tree | 55e2615e4addb24706db4e2308b3ced83e1abace /src/rfkill | |
parent | battery-check: use proc_cmdline_get_bool (diff) | |
download | systemd-022a19c9f69ae7d5fdc283711d111886047d4285.tar.xz systemd-022a19c9f69ae7d5fdc283711d111886047d4285.zip |
reboot-util: cache the result of shall_restore_state
Diffstat (limited to 'src/rfkill')
-rw-r--r-- | src/rfkill/rfkill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 9631513628..c4e93737f5 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -140,7 +140,7 @@ static int load_state(Context *c, const struct rfkill_event *event) { assert(c->rfkill_fd >= 0); assert(event); - if (shall_restore_state() == 0) + if (!shall_restore_state()) return 0; r = determine_state_file(event, &state_file); |