mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
service: don't invoke functions at the same time as declaring variables
This commit is contained in:
parent
8bb2d17d2b
commit
f49650cee2
@ -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 */
|
||||
if (state == SERVICE_EXITED && s->remain_after_exit &&
|
||||
if (state == SERVICE_EXITED &&
|
||||
s->remain_after_exit &&
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user