diff options
author | delphij <delphij@FreeBSD.org> | 2012-11-03 18:38:28 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-11-03 18:38:28 +0000 |
commit | 8dbd4c35e84b7f7553f8d1f359e64e51a6225da1 (patch) | |
tree | 189cba1dc2eeed04cdac2f265ac34711dcf9889e /usr.sbin/watchdogd/watchdogd.c | |
parent | c754915a07dad30e703ea916dcdd42cbd277ba0d (diff) | |
download | FreeBSD-src-8dbd4c35e84b7f7553f8d1f359e64e51a6225da1.zip FreeBSD-src-8dbd4c35e84b7f7553f8d1f359e64e51a6225da1.tar.gz |
Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/watchdogd/watchdogd.c')
-rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index cce84e1..8194f96 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <sysexits.h> #include <unistd.h> @@ -280,7 +281,7 @@ parseargs(int argc, char *argv[]) if (a == 0) timeout = WD_TO_NEVER; else - timeout = 1.0 + log(a * 1e9) / log(2.0); + timeout = flsll(a * 1e9); if (debugging) printf("Timeout is 2^%d nanoseconds\n", timeout); |