summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-10-18 21:04:30 +0000
committerandre <andre@FreeBSD.org>2012-10-18 21:04:30 +0000
commit0a3cd6fb1a5d33eabf957b5c3a05cec28ba61806 (patch)
tree73e023559ad30416409c7350a9c012769f4ff1c2 /sys/kern/uipc_socket.c
parentbd86ceebe0c287f846f0bc2d526000512434483b (diff)
downloadFreeBSD-src-0a3cd6fb1a5d33eabf957b5c3a05cec28ba61806.zip
FreeBSD-src-0a3cd6fb1a5d33eabf957b5c3a05cec28ba61806.tar.gz
Remove unnecessary includes from sosend_copyin() and fix
a couple of style issues.
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 7f4106a..3ab01eb 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -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 mbuf **retmp, int atomic, long *space,
} 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 mbuf **retmp, int atomic, long *space,
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;
OpenPOWER on IntegriCloud