mirror of
https://github.com/troglobit/finit.git
synced 2026-11-30 21:18:22 +00:00
Fix Coverity warning, array cannot be NULL
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
658fb9b037
commit
710a3d2c8f
1 file changed
+3
-3
+3
-3
@@ -161,7 +161,7 @@ static int service_start(svc_t *svc)
|
|||||||
return inetd_start(&svc->inetd);
|
return inetd_start(&svc->inetd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!svc->desc || !svc->desc[0])
|
if (!svc->desc[0])
|
||||||
do_progress = 0;
|
do_progress = 0;
|
||||||
|
|
||||||
if (do_progress) {
|
if (do_progress) {
|
||||||
@@ -481,7 +481,7 @@ static int service_restart(svc_t *svc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_d("Sending SIGHUP to PID %d", svc->pid);
|
_d("Sending SIGHUP to PID %d", svc->pid);
|
||||||
if (svc->desc && svc->desc[0])
|
if (svc->desc[0])
|
||||||
print_desc("Restarting ", svc->desc);
|
print_desc("Restarting ", svc->desc);
|
||||||
|
|
||||||
rc = kill(svc->pid, SIGHUP);
|
rc = kill(svc->pid, SIGHUP);
|
||||||
@@ -495,7 +495,7 @@ static int service_restart(svc_t *svc)
|
|||||||
touch(pid_file(svc));
|
touch(pid_file(svc));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svc->desc && svc->desc[0])
|
if (svc->desc[0])
|
||||||
print_result(rc);
|
print_result(rc);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
Reference in new issue
Block a user