Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Actually, the comment probably meant "would be nice...



details:   https://anonhg.NetBSD.org/src/rev/3a64e3a3ef76
branches:  trunk
changeset: 757495:3a64e3a3ef76
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Sep 01 15:15:18 2010 +0000

description:
Actually, the comment probably meant "would be nice to KASSERT here,
but can't".  So turn it into a KASSERT now that it's possible.

diffstat:

 sys/kern/kern_descrip.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d93f3f5aa95a -r 3a64e3a3ef76 sys/kern/kern_descrip.c
--- a/sys/kern/kern_descrip.c   Wed Sep 01 15:12:16 2010 +0000
+++ b/sys/kern/kern_descrip.c   Wed Sep 01 15:15:18 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $ */
+/*     $NetBSD: kern_descrip.c,v 1.206 2010/09/01 15:15:18 pooka Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.205 2010/09/01 15:12:16 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.206 2010/09/01 15:15:18 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1248,6 +1248,7 @@
        if (__predict_true(fdp == NULL)) {
                fdp = pool_cache_get(filedesc_cache, PR_WAITOK);
        } else {
+               KASSERT(fdp == &filedesc0);
                filedesc_ctor(NULL, fdp, PR_WAITOK);
        }
 



Home | Main Index | Thread Index | Old Index