Module Name: src Committed By: jym Date: Thu May 26 22:18:13 UTC 2011
Modified Files: src/sys/arch/xen/xen: xengnt.c Log Message: Split KASSERT(... && ...) in two, so it's easier to spot which one fired with DIAGNOSTIC. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/xen/xen/xengnt.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/arch/xen/xen/xengnt.c diff -u src/sys/arch/xen/xen/xengnt.c:1.17 src/sys/arch/xen/xen/xengnt.c:1.18 --- src/sys/arch/xen/xen/xengnt.c:1.17 Sat Jan 23 22:32:42 2010 +++ src/sys/arch/xen/xen/xengnt.c Thu May 26 22:18:13 2011 @@ -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);