chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bd7837
)
logind: tighten assertion in execute_shutdown_or_sleep()
author
Alan Jenkins
<alan.christopher.jenkins@gmail.com>
Thu, 24 Aug 2017 14:21:21 +0000
(15:21 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Thu, 24 Aug 2017 14:21:21 +0000
(15:21 +0100)
Following commit
b498d6ea
, I belated realized we should tighten the
assertions as well, to make sure that we're setting `m->action_what` to
represent an action in progress. (The check for an action in progress is
to compare `m->action_what` to zero)
src/login/logind-dbus.c
patch
|
blob
|
history
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index 70c87e9d03504657bd8edc4d5098498ba94d9334..8da2eb63f08395a639499991ac387c740448610e 100644
(file)
--- a/
src/login/logind-dbus.c
+++ b/
src/login/logind-dbus.c
@@
-1532,7
+1532,7
@@
static int execute_shutdown_or_sleep(
int r;
assert(m);
- assert(w >
=
0);
+ assert(w > 0);
assert(w < _INHIBIT_WHAT_MAX);
assert(unit_name);
@@
-1691,7
+1691,7
@@
int bus_manager_shutdown_or_sleep_now_or_later(
assert(m);
assert(unit_name);
- assert(w >
=
0);
+ assert(w > 0);
assert(w <= _INHIBIT_WHAT_MAX);
assert(!m->action_job);