summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_socket.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-03-03 09:14:26 +0000
committerdes <des@FreeBSD.org>2003-03-03 09:14:26 +0000
commit021faa11ac3e8868e33ee981995319d77cba1b58 (patch)
tree328039d4f363f2179be4fe277b395b7f3e9d2d3f /sys/compat/linux/linux_socket.c
parent0968a2b9642c2cbd0a4a82a8fcd1e16cd8f356de (diff)
downloadFreeBSD-src-021faa11ac3e8868e33ee981995319d77cba1b58.zip
FreeBSD-src-021faa11ac3e8868e33ee981995319d77cba1b58.tar.gz
More caddr_t removal, in conjunction with copy{in,out}(9) this time.
Also clean up some egregious casts and incorrect use of sizeof.
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r--sys/compat/linux/linux_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 63dfb97..7e7d3fc 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -116,7 +116,7 @@ do_sa_get(struct sockaddr **sap, const struct osockaddr *osa, int *osalen,
MALLOC(kosa, struct osockaddr *, alloclen, mtype, M_WAITOK);
- if ((error = copyin(osa, (caddr_t) kosa, *osalen)))
+ if ((error = copyin(osa, kosa, *osalen)))
goto out;
bdom = linux_to_bsd_domain(kosa->sa_family);
@@ -365,7 +365,7 @@ linux_sa_put(struct osockaddr *osa)
* Only read/write the osockaddr family part, the rest is
* not changed.
*/
- error = copyin((caddr_t) osa, (caddr_t) &sa, sizeof(sa.sa_family));
+ error = copyin(osa, &sa, sizeof(sa.sa_family));
if (error)
return (error);
@@ -1002,7 +1002,7 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args)
if ((error = copyin(args, &linux_args, sizeof(linux_args))))
return (error);
- error = copyin(linux_args.msg, (caddr_t) &msg, sizeof(msg));
+ error = copyin(linux_args.msg, &msg, sizeof(msg));
if (error)
return (error);
@@ -1085,7 +1085,7 @@ linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args)
if (error)
return (error);
- error = copyin((caddr_t)linux_args.msg, (caddr_t)&msg, sizeof(msg));
+ error = copyin(linux_args.msg, &msg, sizeof(msg));
if (error)
return (error);
if (msg.msg_name && msg.msg_namelen > 2)
OpenPOWER on IntegriCloud