uipc_socket.c (129979) | uipc_socket.c (130246) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 30 */ 31 32#include <sys/cdefs.h> | 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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 129979 2004-06-02 04:15:39Z rwatson $"); | 33__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 130246 2004-06-08 13:08:19Z stefanf $"); |
34 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_zero.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/fcntl.h> --- 1701 unchanged lines hidden (view full) --- 1743 m->m_len); 1744 if (error != 0) { 1745 m_freem(m0); 1746 return(error); 1747 } 1748 } else 1749 bcopy(sopt->sopt_val, mtod(m, char *), m->m_len); 1750 sopt->sopt_valsize -= m->m_len; | 34 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_zero.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/fcntl.h> --- 1701 unchanged lines hidden (view full) --- 1743 m->m_len); 1744 if (error != 0) { 1745 m_freem(m0); 1746 return(error); 1747 } 1748 } else 1749 bcopy(sopt->sopt_val, mtod(m, char *), m->m_len); 1750 sopt->sopt_valsize -= m->m_len; |
1751 (caddr_t)sopt->sopt_val += m->m_len; | 1751 sopt->sopt_val = (char *)sopt->sopt_val + m->m_len; |
1752 m = m->m_next; 1753 } 1754 if (m != NULL) /* should be allocated enoughly at ip6_sooptmcopyin() */ 1755 panic("ip6_sooptmcopyin"); 1756 return 0; 1757} 1758 1759/* XXX; copyout mbuf chain data into soopt for (__FreeBSD__ < 3) routines. */ --- 13 unchanged lines hidden (view full) --- 1773 m->m_len); 1774 if (error != 0) { 1775 m_freem(m0); 1776 return(error); 1777 } 1778 } else 1779 bcopy(mtod(m, char *), sopt->sopt_val, m->m_len); 1780 sopt->sopt_valsize -= m->m_len; | 1752 m = m->m_next; 1753 } 1754 if (m != NULL) /* should be allocated enoughly at ip6_sooptmcopyin() */ 1755 panic("ip6_sooptmcopyin"); 1756 return 0; 1757} 1758 1759/* XXX; copyout mbuf chain data into soopt for (__FreeBSD__ < 3) routines. */ --- 13 unchanged lines hidden (view full) --- 1773 m->m_len); 1774 if (error != 0) { 1775 m_freem(m0); 1776 return(error); 1777 } 1778 } else 1779 bcopy(mtod(m, char *), sopt->sopt_val, m->m_len); 1780 sopt->sopt_valsize -= m->m_len; |
1781 (caddr_t)sopt->sopt_val += m->m_len; | 1781 sopt->sopt_val = (char *)sopt->sopt_val + m->m_len; |
1782 valsize += m->m_len; 1783 m = m->m_next; 1784 } 1785 if (m != NULL) { 1786 /* enough soopt buffer should be given from user-land */ 1787 m_freem(m0); 1788 return(EINVAL); 1789 } --- 174 unchanged lines hidden --- | 1782 valsize += m->m_len; 1783 m = m->m_next; 1784 } 1785 if (m != NULL) { 1786 /* enough soopt buffer should be given from user-land */ 1787 m_freem(m0); 1788 return(EINVAL); 1789 } --- 174 unchanged lines hidden --- |