Deleted Added
full compact
uipc_sockbuf.c (17096) uipc_sockbuf.c (17675)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
34 * $Id: uipc_socket2.c,v 1.10 1996/06/12 05:07:35 gpalmer Exp $
34 * $Id: uipc_socket2.c,v 1.12 1996/07/11 16:31:59 wollman Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/proc.h>
41#include <sys/file.h>
42#include <sys/buf.h>

--- 398 unchanged lines hidden (view full) ---

441 register struct sockbuf *sb;
442{
443 register struct mbuf *m;
444 register int len = 0, mbcnt = 0;
445
446 for (m = sb->sb_mb; m; m = m->m_next) {
447 len += m->m_len;
448 mbcnt += MSIZE;
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/proc.h>
41#include <sys/file.h>
42#include <sys/buf.h>

--- 398 unchanged lines hidden (view full) ---

441 register struct sockbuf *sb;
442{
443 register struct mbuf *m;
444 register int len = 0, mbcnt = 0;
445
446 for (m = sb->sb_mb; m; m = m->m_next) {
447 len += m->m_len;
448 mbcnt += MSIZE;
449 if (m->m_flags & M_EXT)
449 if (m->m_flags & M_EXT) /*XXX*/ /* pretty sure this is bogus */
450 mbcnt += m->m_ext.ext_size;
451 if (m->m_nextpkt)
452 panic("sbcheck nextpkt");
453 }
454 if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
455 printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
456 mbcnt, sb->sb_mbcnt);
457 panic("sbcheck");

--- 449 unchanged lines hidden ---
450 mbcnt += m->m_ext.ext_size;
451 if (m->m_nextpkt)
452 panic("sbcheck nextpkt");
453 }
454 if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
455 printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
456 mbcnt, sb->sb_mbcnt);
457 panic("sbcheck");

--- 449 unchanged lines hidden ---