Minor style tweaks.

This commit is contained in:
Pawel Jakub Dawidek 2013-02-07 00:27:11 +00:00
parent 222069f454
commit 82b316b377
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246447

View File

@ -956,11 +956,11 @@ kern_recvit(td, s, mp, fromseg, controlp)
int i;
ssize_t len;
int error;
struct mbuf *m, *control = 0;
struct mbuf *m, *control = NULL;
caddr_t ctlbuf;
struct file *fp;
struct socket *so;
struct sockaddr *fromsa = 0;
struct sockaddr *fromsa = NULL;
#ifdef KTRACE
struct uio *ktruio = NULL;
#endif
@ -1001,8 +1001,8 @@ kern_recvit(td, s, mp, fromseg, controlp)
ktruio = cloneuio(&auio);
#endif
len = auio.uio_resid;
error = soreceive(so, &fromsa, &auio, (struct mbuf **)0,
(mp->msg_control || controlp) ? &control : (struct mbuf **)0,
error = soreceive(so, &fromsa, &auio, NULL,
(mp->msg_control || controlp) ? &control : NULL,
&mp->msg_flags);
if (error) {
if (auio.uio_resid != len && (error == ERESTART ||
@ -1020,7 +1020,7 @@ kern_recvit(td, s, mp, fromseg, controlp)
td->td_retval[0] = len - auio.uio_resid;
if (mp->msg_name) {
len = mp->msg_namelen;
if (len <= 0 || fromsa == 0)
if (len <= 0 || fromsa == NULL)
len = 0;
else {
/* save sa_len before it is destroyed by MSG_COMPAT */
@ -1095,7 +1095,7 @@ kern_recvit(td, s, mp, fromseg, controlp)
if (fromsa)
free(fromsa, M_SONAME);
if (error == 0 && controlp != NULL)
if (error == 0 && controlp != NULL)
*controlp = control;
else if (control)
m_freem(control);
@ -1716,7 +1716,7 @@ getsockaddr(namp, uaddr, len)
struct sendfile_sync {
struct mtx mtx;
struct cv cv;
unsigned count;
unsigned count;
};
/*
@ -2233,7 +2233,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
}
/* Quit outer loop on error or when we're done. */
if (done)
if (done)
break;
if (error)
goto done;
@ -2333,7 +2333,7 @@ sys_sctp_peeloff(td, uap)
CURVNET_SET(head->so_vnet);
so = sonewconn(head, SS_ISCONNECTED);
if (so == NULL)
if (so == NULL)
goto noconnection;
/*
* Before changing the flags on the socket, we have to bump the
@ -2387,12 +2387,12 @@ int
sys_sctp_generic_sendmsg (td, uap)
struct thread *td;
struct sctp_generic_sendmsg_args /* {
int sd,
caddr_t msg,
int mlen,
caddr_t to,
__socklen_t tolen,
struct sctp_sndrcvinfo *sinfo,
int sd,
caddr_t msg,
int mlen,
caddr_t to,
__socklen_t tolen,
struct sctp_sndrcvinfo *sinfo,
int flags
} */ *uap;
{
@ -2498,12 +2498,12 @@ int
sys_sctp_generic_sendmsg_iov(td, uap)
struct thread *td;
struct sctp_generic_sendmsg_iov_args /* {
int sd,
struct iovec *iov,
int iovlen,
caddr_t to,
__socklen_t tolen,
struct sctp_sndrcvinfo *sinfo,
int sd,
struct iovec *iov,
int iovlen,
caddr_t to,
__socklen_t tolen,
struct sctp_sndrcvinfo *sinfo,
int flags
} */ *uap;
{
@ -2625,12 +2625,12 @@ int
sys_sctp_generic_recvmsg(td, uap)
struct thread *td;
struct sctp_generic_recvmsg_args /* {
int sd,
struct iovec *iov,
int sd,
struct iovec *iov,
int iovlen,
struct sockaddr *from,
struct sockaddr *from,
__socklen_t *fromlenaddr,
struct sctp_sndrcvinfo *sinfo,
struct sctp_sndrcvinfo *sinfo,
int *msg_flags
} */ *uap;
{
@ -2696,7 +2696,7 @@ sys_sctp_generic_recvmsg(td, uap)
}
auio.uio_iov = iov;
auio.uio_iovcnt = uap->iovlen;
auio.uio_segflg = UIO_USERSPACE;
auio.uio_segflg = UIO_USERSPACE;
auio.uio_rw = UIO_READ;
auio.uio_td = td;
auio.uio_offset = 0; /* XXX */
@ -2767,7 +2767,7 @@ sys_sctp_generic_recvmsg(td, uap)
out:
free(iov, M_IOV);
out1:
if (fp)
if (fp)
fdrop(fp, td);
return (error);