summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcoppa <dcoppa@openbsd.org>2014-09-26 10:39:28 +0000
committerdcoppa <dcoppa@openbsd.org>2014-09-26 10:39:28 +0000
commit2a640de27488a7590bf4ebc59e4766b655958915 (patch)
tree56bf94bcf4405193a7d2f36c4a48afd4693807a6
parentansify; ok kettenis@ (diff)
downloadwireguard-openbsd-2a640de27488a7590bf4ebc59e4766b655958915.tar.xz
wireguard-openbsd-2a640de27488a7590bf4ebc59e4766b655958915.zip
zap now unused "PERFINC"
restore original behavior of apmtimeout ok tedu@
-rw-r--r--usr.sbin/apmd/apmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 57976d84fff..6954f44af63 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.68 2014/09/26 08:55:59 tedu Exp $ */
+/* $OpenBSD: apmd.c,v 1.69 2014/09/26 10:39:28 dcoppa Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -61,7 +61,6 @@ const char sockfile[] = _PATH_APM_SOCKET;
int debug = 0;
int doperf = PERF_NONE;
-#define PERFINC 50
#define PERFDEC 20
#define PERFMIN 0
#define PERFMAX 100
@@ -643,9 +642,11 @@ main(int argc, char *argv[])
sts.tv_sec = 0;
sts.tv_nsec = 200000000;
perf_status(&pinfo, ncpu);
+ apmtimeout += 1;
+ } else {
+ apmtimeout += sts.tv_sec;
}
- apmtimeout += 1;
if ((rv = kevent(kq, NULL, 0, ev, 1, &sts)) < 0)
break;