Date: Sun, 3 Apr 2016 06:22:36 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r297518 - stable/10/sys/compat/linux Message-ID: <201604030622.u336Ma9s006004@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sun Apr 3 06:22:36 2016 New Revision: 297518 URL: https://svnweb.freebsd.org/changeset/base/297518 Log: MFC r297309: Whitespaces and style(9) fix. No functional changes. Modified: stable/10/sys/compat/linux/linux_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_socket.c ============================================================================== --- stable/10/sys/compat/linux/linux_socket.c Sat Apr 2 19:42:12 2016 (r297517) +++ stable/10/sys/compat/linux/linux_socket.c Sun Apr 3 06:22:36 2016 (r297518) @@ -448,7 +448,7 @@ linux_to_bsd_msg_flags(int flags) if (flags & LINUX_MSG_ERRQUEUE) ; #endif - return ret_flags; + return (ret_flags); } /* @@ -463,15 +463,12 @@ bsd_to_linux_sockaddr(struct sockaddr *a struct sockaddr sa; size_t sa_len = sizeof(struct sockaddr); int error; - + if ((error = copyin(arg, &sa, sa_len))) return (error); - + *(u_short *)&sa = sa.sa_family; - - error = copyout(&sa, arg, sa_len); - - return (error); + return (copyout(&sa, arg, sa_len)); } static int @@ -486,10 +483,7 @@ linux_to_bsd_sockaddr(struct sockaddr *a sa.sa_family = *(sa_family_t *)&sa; sa.sa_len = len; - - error = copyout(&sa, arg, sa_len); - - return (error); + return (copyout(&sa, arg, sa_len)); } static int @@ -511,11 +505,7 @@ linux_sa_put(struct osockaddr *osa) return (EINVAL); sa.sa_family = bdom; - error = copyout(&sa, osa, sizeof(sa.sa_family)); - if (error) - return (error); - - return (0); + return (copyout(&sa, osa, sizeof(sa.sa_family))); } static int @@ -898,10 +888,7 @@ linux_getsockname(struct thread *td, str bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa); if (error) return (error); - error = linux_sa_put(PTRIN(args->addr)); - if (error) - return (error); - return (0); + return (linux_sa_put(PTRIN(args->addr))); } int @@ -921,10 +908,7 @@ linux_getpeername(struct thread *td, str bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa); if (error) return (error); - error = linux_sa_put(PTRIN(args->addr)); - if (error) - return (error); - return (0); + return (linux_sa_put(PTRIN(args->addr))); } int @@ -989,7 +973,7 @@ linux_send(struct thread *td, struct lin bsd_args.flags = args->flags; bsd_args.to = NULL; bsd_args.tolen = 0; - return sys_sendto(td, &bsd_args); + return (sys_sendto(td, &bsd_args)); } struct linux_recv_args { @@ -1026,7 +1010,6 @@ linux_sendto(struct thread *td, struct l { struct msghdr msg; struct iovec aiov; - int error; if (linux_check_hdrincl(td, args->s) == 0) /* IP_HDRINCL set, tweak the packet before sending */ @@ -1040,9 +1023,8 @@ linux_sendto(struct thread *td, struct l msg.msg_flags = 0; aiov.iov_base = PTRIN(args->msg); aiov.iov_len = args->len; - error = linux_sendit(td, args->s, &msg, args->flags, NULL, - UIO_USERSPACE); - return (error); + return (linux_sendit(td, args->s, &msg, args->flags, NULL, + UIO_USERSPACE)); } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604030622.u336Ma9s006004>