summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/systat/sensors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c
index c0c86eb64bf..d4aa6872503 100644
--- a/usr.bin/systat/sensors.c
+++ b/usr.bin/systat/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.9 2007/03/23 01:10:38 ckuethe Exp $ */
+/* $OpenBSD: sensors.c,v 1.10 2007/03/23 06:56:40 ckuethe Exp $ */
/*
* Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org>
@@ -235,6 +235,8 @@ fmttime(double in)
} else if (in >= 1 ){
unit = "sec";
/* in *= 1; */ /* no op */
+ } else if (in == 0 ){ /* direct comparisons to floats are scary */
+ unit = "sec";
} else if (in >= 1e-3 ){
unit = "mS";
in *= 1e3;