Date: Thu, 18 Oct 2012 21:04:31 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241704 - head/sys/kern Message-ID: <201210182104.q9IL4Vpi022757@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Thu Oct 18 21:04:30 2012 New Revision: 241704 URL: http://svn.freebsd.org/changeset/base/241704 Log: Remove unnecessary includes from sosend_copyin() and fix a couple of style issues. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Oct 18 20:22:17 2012 (r241703) +++ head/sys/kern/uipc_socket.c Thu Oct 18 21:04:30 2012 (r241704) @@ -860,12 +860,6 @@ struct so_zerocopy_stats{ int found_ifp; }; struct so_zerocopy_stats so_zerocp_stats = {0,0,0}; -#include <netinet/in.h> -#include <net/route.h> -#include <netinet/in_pcb.h> -#include <vm/vm.h> -#include <vm/vm_page.h> -#include <vm/vm_object.h> /* * sosend_copyin() is only used if zero copy sockets are enabled. Otherwise @@ -907,9 +901,9 @@ sosend_copyin(struct uio *uio, struct mb } else m = m_get(M_WAITOK, MT_DATA); if (so_zero_copy_send && - resid>=PAGE_SIZE && - *space>=PAGE_SIZE && - uio->uio_iov->iov_len>=PAGE_SIZE) { + resid >= PAGE_SIZE && + *space >= PAGE_SIZE && + uio->uio_iov->iov_len >= PAGE_SIZE) { so_zerocp_stats.size_ok++; so_zerocp_stats.align_ok++; cow_send = socow_setup(m, uio); @@ -946,7 +940,7 @@ sosend_copyin(struct uio *uio, struct mb if (cow_send) error = 0; else - error = uiomove(mtod(m, void *), (int)len, uio); + error = uiomove(mtod(m, void *), (int)len, uio); resid = uio->uio_resid; m->m_len = len; *mp = m;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210182104.q9IL4Vpi022757>