summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/hcsecd/hcsecd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bluetooth/hcsecd/hcsecd.c')
-rw-r--r--usr.sbin/bluetooth/hcsecd/hcsecd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bluetooth/hcsecd/hcsecd.c b/usr.sbin/bluetooth/hcsecd/hcsecd.c
index de7a775..72f9c8c 100644
--- a/usr.sbin/bluetooth/hcsecd/hcsecd.c
+++ b/usr.sbin/bluetooth/hcsecd/hcsecd.c
@@ -128,9 +128,8 @@ main(int argc, char *argv[])
(void * const) &filter, sizeof(filter)) < 0)
err(1, "Could not set HCI socket filter");
- if (detach)
- if (daemon(0, 0) < 0)
- err(1, "Could not daemon()ize");
+ if (detach && daemon(0, 0) < 0)
+ err(1, "Could not daemon()ize");
openlog(HCSECD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON);
OpenPOWER on IntegriCloud