diff options
author | 2012-12-31 13:46:49 +0000 | |
---|---|---|
committer | 2012-12-31 13:46:49 +0000 | |
commit | 2ff0994fb8549c6728a259e367033ee385631d23 (patch) | |
tree | 87bb7493d6d236e7e487ef5368df87ad4f67ce40 | |
parent | Extend the sbcheck() function to make it work with socket buffers (diff) | |
download | wireguard-openbsd-2ff0994fb8549c6728a259e367033ee385631d23.tar.xz wireguard-openbsd-2ff0994fb8549c6728a259e367033ee385631d23.zip |
Put the #ifdef SOCKBUF_DEBUG around sbcheck() into a SBCHECK macro.
That is consistent to the SBLASTRECORDCHK and SBLASTMBUFCHK macros.
OK markus@
-rw-r--r-- | sys/kern/uipc_socket.c | 6 | ||||
-rw-r--r-- | sys/sys/socketvar.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9972abca17b..62ea6679b9c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.109 2012/10/05 01:30:28 yasuoka Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.110 2012/12/31 13:46:49 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1230,9 +1230,7 @@ somove(struct socket *so, int wait) SBLASTRECORDCHK(&so->so_rcv, "somove"); SBLASTMBUFCHK(&so->so_rcv, "somove"); KASSERT(so->so_rcv.sb_mb == so->so_rcv.sb_lastrecord); -#ifdef SOCKBUF_DEBUG - sbcheck(&so->so_rcv); -#endif + SBCHECK(&so->so_rcv); /* m might be NULL if the loop did break during the first iteration. */ if (m == NULL) diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 732cead85c4..b58b585076c 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socketvar.h,v 1.53 2012/09/15 00:47:08 guenther Exp $ */ +/* $OpenBSD: socketvar.h,v 1.54 2012/12/31 13:46:49 bluhm Exp $ */ /* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */ /*- @@ -263,7 +263,6 @@ int sbappendaddr(struct sockbuf *sb, struct sockaddr *asa, int sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control); void sbappendrecord(struct sockbuf *sb, struct mbuf *m0); -void sbcheck(struct sockbuf *sb); void sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n); struct mbuf * sbcreatecontrol(caddr_t p, int size, int type, int level); @@ -325,9 +324,12 @@ void sblastrecordchk(struct sockbuf *, const char *); void sblastmbufchk(struct sockbuf *, const char *); #define SBLASTMBUFCHK(sb, where) sblastmbufchk((sb), (where)) +void sbcheck(struct sockbuf *sb); +#define SBCHECK(sb) sbcheck(sb) #else #define SBLASTRECORDCHK(sb, where) /* nothing */ #define SBLASTMBUFCHK(sb, where) /* nothing */ +#define SBCHECK(sb) /* nothing */ #endif /* SOCKBUF_DEBUG */ #endif /* _KERNEL */ |