Fix Coverity warning, array cannot be NULL

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-01-23 11:45:15 +01:00
parent 658fb9b037
commit 710a3d2c8f
+3 -3
View File
@@ -161,7 +161,7 @@ static int service_start(svc_t *svc)
return inetd_start(&svc->inetd);
#endif
if (!svc->desc || !svc->desc[0])
if (!svc->desc[0])
do_progress = 0;
if (do_progress) {
@@ -481,7 +481,7 @@ static int service_restart(svc_t *svc)
}
_d("Sending SIGHUP to PID %d", svc->pid);
if (svc->desc && svc->desc[0])
if (svc->desc[0])
print_desc("Restarting ", svc->desc);
rc = kill(svc->pid, SIGHUP);
@@ -495,7 +495,7 @@ static int service_restart(svc_t *svc)
touch(pid_file(svc));
}
if (svc->desc && svc->desc[0])
if (svc->desc[0])
print_result(rc);
return rc;