Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libsockin add missing KASSERT()s at the top...



details:   https://anonhg.NetBSD.org/src/rev/4f4dbda69891
branches:  trunk
changeset: 797803:4f4dbda69891
user:      rtr <rtr%NetBSD.org@localhost>
date:      Mon Jul 28 10:09:51 2014 +0000

description:
add missing KASSERT()s at the top of sockin_usrreq(), req shall not be
either of these operations.

>       KASSERT(req != PRU_BIND);
>       KASSERT(req != PRU_LISTEN);

diffstat:

 sys/rump/net/lib/libsockin/sockin.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 2aa003564733 -r 4f4dbda69891 sys/rump/net/lib/libsockin/sockin.c
--- a/sys/rump/net/lib/libsockin/sockin.c       Mon Jul 28 10:01:23 2014 +0000
+++ b/sys/rump/net/lib/libsockin/sockin.c       Mon Jul 28 10:09:51 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sockin.c,v 1.51 2014/07/24 15:12:03 rtr Exp $  */
+/*     $NetBSD: sockin.c,v 1.52 2014/07/28 10:09:51 rtr Exp $  */
 
 /*
  * Copyright (c) 2008, 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.51 2014/07/24 15:12:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.52 2014/07/28 10:09:51 rtr Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -558,6 +558,8 @@
        int error = 0;
 
        KASSERT(req != PRU_ACCEPT);
+       KASSERT(req != PRU_BIND);
+       KASSERT(req != PRU_LISTEN);
        KASSERT(req != PRU_CONTROL);
        KASSERT(req != PRU_SENSE);
        KASSERT(req != PRU_PEERADDR);



Home | Main Index | Thread Index | Old Index