core/service: declare 'int r' at the beginning
This commit is contained in:
+1
-3
@@ -3701,6 +3701,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
||||
Service *s = SERVICE(u);
|
||||
ServiceResult f;
|
||||
ExitClean clean_mode;
|
||||
int r;
|
||||
|
||||
assert(s);
|
||||
assert(pid >= 0);
|
||||
@@ -3952,7 +3953,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
||||
|
||||
if (s->pid_file) {
|
||||
bool has_start_post;
|
||||
int r;
|
||||
|
||||
/* Let's try to load the pid file here if we can.
|
||||
* The PID file might actually be created by a START_POST
|
||||
@@ -3979,8 +3979,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
||||
}
|
||||
|
||||
if (s->pid_file) {
|
||||
int r;
|
||||
|
||||
r = service_load_pid_file(s, true);
|
||||
if (r < 0) {
|
||||
r = service_demand_pid_file(s);
|
||||
|
||||
Reference in New Issue
Block a user