diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-02-27 15:11:31 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-02-27 15:11:31 +0000 |
commit | 28b75de70b9d43f125c1845997ae8064f43c299c (patch) | |
tree | c994223f5477e30aba996644831d3df8ecef4f82 /sys/kern | |
parent | 07928b29999cf057821047b25c00ccd10614a3f2 (diff) | |
download | FreeBSD-src-28b75de70b9d43f125c1845997ae8064f43c299c.zip FreeBSD-src-28b75de70b9d43f125c1845997ae8064f43c299c.tar.gz |
Correctly declare variables as u_int rather than doing typecasts.
Kill some register declarations while I'm here.
Submitted by: bde (1)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_generic.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 0235e89..b5a9c41 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -73,7 +73,7 @@ static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); static MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); MALLOC_DEFINE(M_IOV, "iov", "large iov's"); -static int pollscan __P((struct proc *, struct pollfd *, int)); +static int pollscan __P((struct proc *, struct pollfd *, u_int)); static int selscan __P((struct proc *, fd_mask **, fd_mask **, int)); static int dofileread __P((struct proc *, struct file *, int, void *, size_t, off_t, int)); @@ -852,13 +852,14 @@ struct poll_args { #endif int poll(p, uap) - register struct proc *p; - register struct poll_args *uap; + struct proc *p; + struct poll_args *uap; { caddr_t bits; char smallbits[32 * sizeof(struct pollfd)]; struct timeval atv, rtv, ttv; - int s, ncoll, error = 0, timo, nfds; + int s, ncoll, error = 0, timo; + u_int nfds; size_t ni; nfds = SCARG(uap, nfds); @@ -869,8 +870,7 @@ poll(p, uap) * least enough for the current limits. We want to be reasonably * safe, but not overly restrictive. */ - if ((u_int)nfds > p->p_rlimit[RLIMIT_NOFILE].rlim_cur && - (u_int)nfds > FD_SETSIZE) + if (nfds > p->p_rlimit[RLIMIT_NOFILE].rlim_cur && nfds > FD_SETSIZE) return (EINVAL); ni = nfds * sizeof(struct pollfd); if (ni > sizeof(smallbits)) @@ -946,7 +946,7 @@ static int pollscan(p, fds, nfd) struct proc *p; struct pollfd *fds; - int nfd; + u_int nfd; { register struct filedesc *fdp = p->p_fd; int i; |