Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Reduce some indentation.



details:   https://anonhg.NetBSD.org/src/rev/ac8e617d323f
branches:  trunk
changeset: 807382:ac8e617d323f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Apr 08 02:35:33 2015 +0000

description:
Reduce some indentation.

diffstat:

 sys/kern/kern_rndq.c |  23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diffs (44 lines):

diff -r 040182bfb76b -r ac8e617d323f sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Wed Apr 08 02:32:26 2015 +0000
+++ b/sys/kern/kern_rndq.c      Wed Apr 08 02:35:33 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rndq.c,v 1.31 2015/04/08 02:32:26 riastradh Exp $ */
+/*     $NetBSD: kern_rndq.c,v 1.32 2015/04/08 02:35:33 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.31 2015/04/08 02:32:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.32 2015/04/08 02:35:33 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -284,16 +284,15 @@
        KASSERT(mutex_owned(&rndpool_mtx));
 
        LIST_FOREACH(rs, &rnd_sources, list) {
-               if (rs->flags & RND_FLAG_HASCB) {
-                       KASSERT(rs->get != NULL);
-                       KASSERT(rs->getarg != NULL);
-                       rs->get(byteswanted, rs->getarg);
-                       rnd_printf_verbose("rnd: entropy estimate %zu bits\n",
-                           rndpool_get_entropy_count(&rnd_pool));
-                       rnd_printf_verbose("rnd: asking source %s"
-                           " for %zu bytes\n",
-                           rs->name, byteswanted);
-               }
+               if (!ISSET(rs->flags, RND_FLAG_HASCB))
+                       continue;
+               KASSERT(rs->get != NULL);
+               KASSERT(rs->getarg != NULL);
+               rs->get(byteswanted, rs->getarg);
+               rnd_printf_verbose("rnd: entropy estimate %zu bits\n",
+                   rndpool_get_entropy_count(&rnd_pool));
+               rnd_printf_verbose("rnd: asking source %s for %zu bytes\n",
+                   rs->name, byteswanted);
        }
 }
 



Home | Main Index | Thread Index | Old Index