summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2015-04-21 12:07:31 +0000
committerriastradh <riastradh@NetBSD.org>2015-04-21 12:07:31 +0000
commit04c9fe587c2e198f214344bb9e4a46baea8e1635 (patch)
tree0d62f3615c4a93702047fef900838a30a4de3225 /sys/dev
parent2f3160234eef344bdfbf97f8534db61d1b27f057 (diff)
Xor, not ior, to combine bits of binuptime for rnd_counter.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/rndpseudo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/rndpseudo.c b/sys/dev/rndpseudo.c
index d9d0ba86c23..709c7004ea5 100644
--- a/sys/dev/rndpseudo.c
+++ b/sys/dev/rndpseudo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpseudo.c,v 1.31 2015/04/14 12:51:30 riastradh Exp $ */
+/* $NetBSD: rndpseudo.c,v 1.32 2015/04/21 12:07:31 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.31 2015/04/14 12:51:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.32 2015/04/21 12:07:31 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -168,9 +168,9 @@ rndpseudo_counter(void)
binuptime(&bt);
ret = bt.sec;
- ret |= bt.sec >> 32;
- ret |= bt.frac;
- ret |= bt.frac >> 32;
+ ret ^= bt.sec >> 32;
+ ret ^= bt.frac;
+ ret ^= bt.frac >> 32;
return ret;
}