chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manager: show which jobs are actually installed after a transaction
[elogind.git]
/
src
/
timer.c
diff --git
a/src/timer.c
b/src/timer.c
index ff94b8c8693a70d659052e5c53eb0a5de02f095f..627a360fe6f339f5a2e413b72e1e4101742eed55 100644
(file)
--- a/
src/timer.c
+++ b/
src/timer.c
@@
-161,9
+161,7
@@
static int timer_coldplug(Unit *u) {
if (t->deserialized_state != t->state) {
if (t->deserialized_state != t->state) {
- if (t->deserialized_state == TIMER_WAITING ||
- t->deserialized_state == TIMER_RUNNING ||
- t->deserialized_state == TIMER_ELAPSED)
+ if (t->deserialized_state == TIMER_WAITING)
timer_enter_waiting(t, false);
else
timer_set_state(t, t->deserialized_state);
timer_enter_waiting(t, false);
else
timer_set_state(t, t->deserialized_state);
@@
-197,9
+195,9
@@
static void timer_enter_waiting(Timer *t, bool initial) {
switch (v->base) {
case TIMER_ACTIVE:
switch (v->base) {
case TIMER_ACTIVE:
- if (state_translation_table[t->state] == UNIT_ACTIVE)
{
+ if (state_translation_table[t->state] == UNIT_ACTIVE)
base = t->meta.inactive_exit_timestamp.monotonic;
base = t->meta.inactive_exit_timestamp.monotonic;
-
}
else
+ else
base = n;
break;
base = n;
break;
@@
-430,7
+428,7
@@
void timer_unit_notify(Unit *u, UnitActiveState new_state) {
case TIMER_DEAD:
case TIMER_FAILED:
case TIMER_DEAD:
case TIMER_FAILED:
- ;
+
break
;
default:
assert_not_reached("Unknown timer state");
default:
assert_not_reached("Unknown timer state");