Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen Split KASSERT(... && ...) in two, so it's e...



details:   https://anonhg.NetBSD.org/src/rev/9555f7053e36
branches:  trunk
changeset: 765437:9555f7053e36
user:      jym <jym%NetBSD.org@localhost>
date:      Thu May 26 22:18:13 2011 +0000

description:
Split KASSERT(... && ...) in two, so it's easier to spot which one
fired with DIAGNOSTIC.

diffstat:

 sys/arch/xen/xen/xengnt.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r d9d7ffc73faf -r 9555f7053e36 sys/arch/xen/xen/xengnt.c
--- a/sys/arch/xen/xen/xengnt.c Thu May 26 22:16:42 2011 +0000
+++ b/sys/arch/xen/xen/xengnt.c Thu May 26 22:18:13 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xengnt.c,v 1.17 2010/01/23 22:32:42 cegger Exp $      */
+/*      $NetBSD: xengnt.c,v 1.18 2011/05/26 22:18:13 jym Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.17 2010/01/23 22:32:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.18 2011/05/26 22:18:13 jym Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -210,7 +210,8 @@
        gnt_entries[last_gnt_entry] = XENGNT_NO_ENTRY;
        splx(s);
        KASSERT(entry != XENGNT_NO_ENTRY);
-       KASSERT(last_gnt_entry >= 0 && last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE);
+       KASSERT(last_gnt_entry >= 0);
+       KASSERT(last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE);
        return entry;
 }
 
@@ -222,7 +223,8 @@
 {
        int s = splvm();
        KASSERT(gnt_entries[last_gnt_entry] == XENGNT_NO_ENTRY);
-       KASSERT(last_gnt_entry >= 0 && last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE);
+       KASSERT(last_gnt_entry >= 0);
+       KASSERT(last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE);
        gnt_entries[last_gnt_entry] = entry;
        last_gnt_entry++;
        splx(s);



Home | Main Index | Thread Index | Old Index