summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-25 15:45:36 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-25 15:45:36 +0000
commit1ef7027ba64b447255f494c13c9677babe364254 (patch)
tree49c00e8b3954098ffe06d1dcf6fcc04d85c9fdf9
parent92261164bbe863141b88817eaaec2e79b3df7a90 (diff)
Move debug output into condition
-rw-r--r--hcid/dbus-service.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 213dd279..5dda35a9 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -308,12 +308,14 @@ static gboolean service_shutdown_timeout(gpointer data)
{
struct service *service = data;
- debug("Sending SIGKILL to \"%s\" (PID %d) since it didn't exit yet",
+ if (service->pid > 0) {
+ debug("SIGKILL for \"%s\" (PID %d) since it didn't exit yet",
service->name, service->pid);
- if (service->pid > 0 && kill(service->pid, SIGKILL) < 0)
- error("kill(%d, SIGKILL): %s (%d)", service->pid,
- strerror(errno), errno);
+ if (kill(service->pid, SIGKILL) < 0)
+ error("kill(%d, SIGKILL): %s (%d)", service->pid,
+ strerror(errno), errno);
+ }
service->shutdown_timer = 0;