diff options
author | des <des@FreeBSD.org> | 2003-03-02 15:56:49 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-03-02 15:56:49 +0000 |
commit | 7b016a11e606d722eb050e0f5b2da9797f9d4b2a (patch) | |
tree | 9d914583b19df0e7843f6931745ec9d08a2c4793 /sys/kern | |
parent | 765ebc59b49b789f220d5975fee1fafe86545825 (diff) | |
download | FreeBSD-src-7b016a11e606d722eb050e0f5b2da9797f9d4b2a.zip FreeBSD-src-7b016a11e606d722eb050e0f5b2da9797f9d4b2a.tar.gz |
Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_pty.c | 48 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 66 |
2 files changed, 57 insertions, 57 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 94923be..83f2b9c 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -136,7 +136,7 @@ static char *names = "pqrsPQRS"; * pts == /dev/tty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] * ptc == /dev/pty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] * - * XXX: define and add mapping of upper minor bits to allow more + * XXX: define and add mapping of upper minor bits to allow more * than 256 ptys. */ static dev_t @@ -172,12 +172,12 @@ ptsopen(dev, flag, devtype, td) int flag, devtype; struct thread *td; { - register struct tty *tp; + struct tty *tp; int error; struct pt_ioctl *pti; if (!dev->si_drv1) - return(ENXIO); + return(ENXIO); pti = dev->si_drv1; tp = dev->si_tty; if ((tp->t_state & TS_ISOPEN) == 0) { @@ -214,7 +214,7 @@ ptsclose(dev, flag, mode, td) int flag, mode; struct thread *td; { - register struct tty *tp; + struct tty *tp; int err; tp = dev->si_tty; @@ -232,8 +232,8 @@ ptsread(dev, uio, flag) { struct thread *td = curthread; struct proc *p = td->td_proc; - register struct tty *tp = dev->si_tty; - register struct pt_ioctl *pti = dev->si_drv1; + struct tty *tp = dev->si_tty; + struct pt_ioctl *pti = dev->si_drv1; struct pgrp *pg; int error = 0; @@ -296,7 +296,7 @@ ptswrite(dev, uio, flag) struct uio *uio; int flag; { - register struct tty *tp; + struct tty *tp; tp = dev->si_tty; if (tp->t_oproc == 0) @@ -312,7 +312,7 @@ static void ptsstart(tp) struct tty *tp; { - register struct pt_ioctl *pti = tp->t_dev->si_drv1; + struct pt_ioctl *pti = tp->t_dev->si_drv1; if (tp->t_state & TS_TTSTOP) return; @@ -346,13 +346,13 @@ ptcopen(dev, flag, devtype, td) int flag, devtype; struct thread *td; { - register struct tty *tp; + struct tty *tp; struct pt_ioctl *pti; if (!dev->si_drv1) ptyinit(dev); if (!dev->si_drv1) - return(ENXIO); + return(ENXIO); tp = dev->si_tty; if (tp->t_oproc) return (EIO); @@ -376,7 +376,7 @@ ptcclose(dev, flags, fmt, td) int fmt; struct thread *td; { - register struct tty *tp; + struct tty *tp; tp = dev->si_tty; (void)(*linesw[tp->t_line].l_modem)(tp, 0); @@ -405,7 +405,7 @@ ptcread(dev, uio, flag) struct uio *uio; int flag; { - register struct tty *tp = dev->si_tty; + struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; char buf[BUFSIZ]; int error = 0, cc; @@ -462,7 +462,7 @@ ptcread(dev, uio, flag) static void ptsstop(tp, flush) - register struct tty *tp; + struct tty *tp; int flush; { struct pt_ioctl *pti = tp->t_dev->si_drv1; @@ -490,7 +490,7 @@ ptcpoll(dev, events, td) int events; struct thread *td; { - register struct tty *tp = dev->si_tty; + struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; int revents = 0; int s; @@ -513,7 +513,7 @@ ptcpoll(dev, events, td) if (events & (POLLOUT | POLLWRNORM)) if (tp->t_state & TS_ISOPEN && ((pti->pt_flags & PF_REMOTE) ? - (tp->t_canq.c_cc == 0) : + (tp->t_canq.c_cc == 0) : ((tp->t_rawq.c_cc + tp->t_canq.c_cc < TTYHOG - 2) || (tp->t_canq.c_cc == 0 && (tp->t_lflag & ICANON))))) revents |= events & (POLLOUT | POLLWRNORM); @@ -526,7 +526,7 @@ ptcpoll(dev, events, td) if (events & (POLLIN | POLLRDNORM)) selrecord(td, &pti->pt_selr); - if (events & (POLLOUT | POLLWRNORM)) + if (events & (POLLOUT | POLLWRNORM)) selrecord(td, &pti->pt_selw); } splx(s); @@ -537,12 +537,12 @@ ptcpoll(dev, events, td) static int ptcwrite(dev, uio, flag) dev_t dev; - register struct uio *uio; + struct uio *uio; int flag; { - register struct tty *tp = dev->si_tty; - register u_char *cp = 0; - register int cc = 0; + struct tty *tp = dev->si_tty; + u_char *cp = 0; + int cc = 0; u_char locbuf[BUFSIZ]; int cnt = 0; struct pt_ioctl *pti = dev->si_drv1; @@ -653,9 +653,9 @@ ptyioctl(dev, cmd, data, flag, td) int flag; struct thread *td; { - register struct tty *tp = dev->si_tty; - register struct pt_ioctl *pti = dev->si_drv1; - register u_char *cc = tp->t_cc; + struct tty *tp = dev->si_tty; + struct pt_ioctl *pti = dev->si_drv1; + u_char *cc = tp->t_cc; int stop, error; if (devsw(dev)->d_open == ptcopen) { @@ -697,7 +697,7 @@ ptyioctl(dev, cmd, data, flag, td) } /* - * The rest of the ioctls shouldn't be called until + * The rest of the ioctls shouldn't be called until * the slave is open. */ if ((tp->t_state & TS_ISOPEN) == 0) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 85ea572..6b7eea7 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -69,9 +69,9 @@ static int do_setopt_accept_filter(struct socket *so, struct sockopt *sopt); #endif -static void filt_sordetach(struct knote *kn); -static int filt_soread(struct knote *kn, long hint); -static void filt_sowdetach(struct knote *kn); +static void filt_sordetach(struct knote *kn); +static int filt_soread(struct knote *kn, long hint); +static void filt_sowdetach(struct knote *kn); static int filt_sowrite(struct knote *kn, long hint); static int filt_solisten(struct knote *kn, long hint); @@ -167,14 +167,14 @@ int socreate(dom, aso, type, proto, cred, td) int dom; struct socket **aso; - register int type; + int type; int proto; struct ucred *cred; struct thread *td; { - register struct protosw *prp; - register struct socket *so; - register int error; + struct protosw *prp; + struct socket *so; + int error; if (proto) prp = pffindproto(dom, proto, type); @@ -258,7 +258,7 @@ sodealloc(struct socket *so) int solisten(so, backlog, td) - register struct socket *so; + struct socket *so; int backlog; struct thread *td; { @@ -285,7 +285,7 @@ solisten(so, backlog, td) void sofree(so) - register struct socket *so; + struct socket *so; { struct socket *head = so->so_head; @@ -327,7 +327,7 @@ sofree(so) */ int soclose(so) - register struct socket *so; + struct socket *so; { int s = splnet(); /* conservative */ int error = 0; @@ -405,7 +405,7 @@ soabort(so) int soaccept(so, nam) - register struct socket *so; + struct socket *so; struct sockaddr **nam; { int s = splnet(); @@ -421,7 +421,7 @@ soaccept(so, nam) int soconnect(so, nam, td) - register struct socket *so; + struct socket *so; struct sockaddr *nam; struct thread *td; { @@ -449,7 +449,7 @@ soconnect(so, nam, td) int soconnect2(so1, so2) - register struct socket *so1; + struct socket *so1; struct socket *so2; { int s = splnet(); @@ -462,7 +462,7 @@ soconnect2(so1, so2) int sodisconnect(so) - register struct socket *so; + struct socket *so; { int s = splnet(); int error; @@ -517,7 +517,7 @@ struct so_zerocopy_stats so_zerocp_stats = {0,0,0}; int sosend(so, addr, uio, top, control, flags, td) - register struct socket *so; + struct socket *so; struct sockaddr *addr; struct uio *uio; struct mbuf *top; @@ -526,8 +526,8 @@ sosend(so, addr, uio, top, control, flags, td) struct thread *td; { struct mbuf **mp; - register struct mbuf *m; - register long space, len, resid; + struct mbuf *m; + long space, len, resid; int clen = 0, error, s, dontroute, mlen; int atomic = sosendallatonce(so) || top; #ifdef ZERO_COPY_SOCKETS @@ -642,10 +642,10 @@ restart: mlen = MLEN; } if (resid >= MINCLSIZE) { -#ifdef ZERO_COPY_SOCKETS +#ifdef ZERO_COPY_SOCKETS if (so_zero_copy_send && - resid>=PAGE_SIZE && - space>=PAGE_SIZE && + resid>=PAGE_SIZE && + space>=PAGE_SIZE && uio->uio_iov->iov_len>=PAGE_SIZE) { so_zerocp_stats.size_ok++; if (!((vm_offset_t) @@ -653,7 +653,7 @@ restart: so_zerocp_stats.align_ok++; cow_send = socow_setup(m, uio); } - } + } if (!cow_send){ #endif /* ZERO_COPY_SOCKETS */ MCLGET(m, M_TRYWAIT); @@ -665,7 +665,7 @@ restart: #ifdef ZERO_COPY_SOCKETS len = PAGE_SIZE; } - + } else { #endif /* ZERO_COPY_SOCKETS */ nopages: @@ -763,7 +763,7 @@ out: */ int soreceive(so, psa, uio, mp0, controlp, flagsp) - register struct socket *so; + struct socket *so; struct sockaddr **psa; struct uio *uio; struct mbuf **mp0; @@ -771,7 +771,7 @@ soreceive(so, psa, uio, mp0, controlp, flagsp) int *flagsp; { struct mbuf *m, **mp; - register int flags, len, error, s, offset; + int flags, len, error, s, offset; struct protosw *pr = so->so_proto; struct mbuf *nextrecord; int moff, type = 0; @@ -980,7 +980,7 @@ dontblock: disposable = 1; else disposable = 0; - + pg = PHYS_TO_VM_PAGE(vtophys(mtod(m, caddr_t) + moff)); @@ -1102,10 +1102,10 @@ release: int soshutdown(so, how) - register struct socket *so; - register int how; + struct socket *so; + int how; { - register struct protosw *pr = so->so_proto; + struct protosw *pr = so->so_proto; if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR)) return (EINVAL); @@ -1119,11 +1119,11 @@ soshutdown(so, how) void sorflush(so) - register struct socket *so; + struct socket *so; { - register struct sockbuf *sb = &so->so_rcv; - register struct protosw *pr = so->so_proto; - register int s; + struct sockbuf *sb = &so->so_rcv; + struct protosw *pr = so->so_proto; + int s; struct sockbuf asb; sb->sb_flags |= SB_NOINTR; @@ -1686,7 +1686,7 @@ soopt_mcopyout(struct sockopt *sopt, struct mbuf *m) void sohasoutofband(so) - register struct socket *so; + struct socket *so; { if (so->so_sigio != NULL) pgsigio(&so->so_sigio, SIGURG, 0); |