summaryrefslogtreecommitdiff
path: root/usr.sbin/sensorsd/sensorsd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-01 22:15:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-01 22:15:41 +0000
commited9a94ba433ac3ee803140b43d3dcf3cd46e22e1 (patch)
tree9e0b79f03b879398910a61a876e0d4e4cc06b461 /usr.sbin/sensorsd/sensorsd.c
parenta79d93b1fa6cb131136c3e41382ffde1addfafa2 (diff)
spacing
Diffstat (limited to 'usr.sbin/sensorsd/sensorsd.c')
-rw-r--r--usr.sbin/sensorsd/sensorsd.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index 11a59d09868..e9641cb070c 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.12 2005/04/01 22:10:23 hshoexer Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.13 2005/04/01 22:15:40 deraadt Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -82,11 +82,8 @@ main(int argc, char *argv[])
struct sensor sensor;
struct limits_t *limit;
size_t len;
- time_t next_report, last_report = 0;
- time_t next_check;
- int mib[3];
- int i, sleeptime, watch_cnt;
- int ch;
+ time_t next_report, last_report = 0, next_check;
+ int mib[3], i, sleeptime, watch_cnt, ch;
while ((ch = getopt(argc, argv, "d")) != -1) {
switch (ch) {
@@ -207,7 +204,7 @@ void
execute(char *command)
{
char *argp[] = {"sh", "-c", command, NULL};
-
+
switch (fork ()) {
case -1:
syslog(LOG_CRIT, "execute: fork() failed");
@@ -252,7 +249,7 @@ report(time_t last_report)
}
i++;
if (cmd[i] == '\0') {
- buf[n++] = '\0';
+ buf[n++] = '\0';
break;
}