Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Assert equality, not assignment, in rnd_hwrng_test.



details:   https://anonhg.NetBSD.org/src/rev/a4b16d707eb3
branches:  trunk
changeset: 784304:a4b16d707eb3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Jan 24 14:23:45 2013 +0000

description:
Assert equality, not assignment, in rnd_hwrng_test.

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

diffstat:

 sys/kern/kern_rndq.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 03fb31df7eea -r a4b16d707eb3 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Thu Jan 24 14:23:09 2013 +0000
+++ b/sys/kern/kern_rndq.c      Thu Jan 24 14:23:45 2013 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index