summaryrefslogtreecommitdiff
path: root/usr.sbin/sensorsd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-15 15:53:20 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-15 15:53:20 +0000
commit62fedcd298aafda298953d3334c08c1996702d4a (patch)
tree19e405f12cad583fa67673301280bdca1c218c69 /usr.sbin/sensorsd
parentbe793154b2acb7110f168e6f5095655f6d3b1764 (diff)
add a default: case to the switch (sensor type) in the config file parser
that just errs out if someone tries to configure limits for a sensor type we do not support, deraadt ok
Diffstat (limited to 'usr.sbin/sensorsd')
-rw-r--r--usr.sbin/sensorsd/sensorsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index 83043b16db7..30bf43566e4 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.8 2004/02/07 16:50:04 deraadt Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.9 2004/03/15 15:53:19 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -309,6 +309,9 @@ get_val(char *buf, int upper, enum sensor_type type)
errx(1, "unknown unit %s for voltage sensor", p);
rval = val * 1000 * 1000;
break;
+ default:
+ errx(1, "unsupported sensor type");
+ /* not reached */
}
free(buf);
return (rval);