Module Name:    src
Committed By:   riastradh
Date:           Thu Jan 24 14:23:45 UTC 2013

Modified Files:
        src/sys/kern: kern_rndq.c

Log Message:
Assert equality, not assignment, in rnd_hwrng_test.

Not tested, but by inspection, the only caller, rnd_process_events,
clearly guarantees the condition.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/kern_rndq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_rndq.c
diff -u src/sys/kern/kern_rndq.c:1.7 src/sys/kern/kern_rndq.c:1.8
--- src/sys/kern/kern_rndq.c:1.7	Wed Jan 16 06:45:24 2013
+++ src/sys/kern/kern_rndq.c	Thu Jan 24 14:23:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_rndq.c,v 1.7 2013/01/16 06:45:24 msaitoh Exp $	*/
+/*	$NetBSD: kern_rndq.c,v 1.8 2013/01/24 14:23:45 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.7 2013/01/16 06:45:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.8 2013/01/24 14:23:45 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -759,7 +759,7 @@ rnd_hwrng_test(rnd_sample_t *sample)
 	uint8_t *v1, *v2;
 	size_t resid, totest;
 
-	KASSERT(source->type = RND_TYPE_RNG);
+	KASSERT(source->type == RND_TYPE_RNG);
 
 	/*
 	 * Continuous-output test: compare two halves of the

Reply via email to