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:
8bb2d17
)
service: don't invoke functions at the same time as declaring variables
author
Lennart Poettering
<lennart@poettering.net>
Thu, 21 Aug 2014 14:20:17 +0000
(16:20 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 21 Aug 2014 15:24:21 +0000
(17:24 +0200)
src/core/service.c
patch
|
blob
|
history
diff --git
a/src/core/service.c
b/src/core/service.c
index f10582d89e14aaeb6ad114494fbd62eac938ed55..fc952e848f08ee9d783c9f3c97a2f9e7e0f788a0 100644
(file)
--- a/
src/core/service.c
+++ b/
src/core/service.c
@@
-694,9
+694,13
@@
static void service_set_state(Service *s, ServiceState state) {
/* For remain_after_exit services, let's see if we can "release" the
* hold on the console, since unit_notify() only does that in case of
* change of state */
/* For remain_after_exit services, let's see if we can "release" the
* hold on the console, since unit_notify() only does that in case of
* change of state */
- if (state == SERVICE_EXITED && s->remain_after_exit &&
+ if (state == SERVICE_EXITED &&
+ s->remain_after_exit &&
UNIT(s)->manager->n_on_console > 0) {
UNIT(s)->manager->n_on_console > 0) {
- ExecContext *ec = unit_get_exec_context(UNIT(s));
+
+ ExecContext *ec;
+
+ ec = unit_get_exec_context(UNIT(s));
if (ec && exec_context_may_touch_console(ec)) {
Manager *m = UNIT(s)->manager;
if (ec && exec_context_may_touch_console(ec)) {
Manager *m = UNIT(s)->manager;