diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-12-31 13:46:50 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-12-31 13:46:50 +0000 |
commit | 478aefa77276fa6aba612d47ca2e50d7173e2109 (patch) | |
tree | 78092cce6a17d84059e09904872d0686c9d39460 /sys | |
parent | db5c4ca34559582b057d407858cf99546e09419a (diff) |
Put the #ifdef SOCKBUF_DEBUG around sbcheck() into a SBCHECK macro.
That is consistent to the SBLASTRECORDCHK and SBLASTMBUFCHK macros.
OK markus@
Diffstat (limited to 'sys')
-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 */ |