summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-06-29 00:29:12 +0000
committeralfred <alfred@FreeBSD.org>2002-06-29 00:29:12 +0000
commit8cd894ca7009ef10fdf67d1a9583636aaf3b2c6f (patch)
tree02c07184de3f283201ad58d9e78c7c346fa4003b /sys/kern
parentd47feb4376b0a9a2ebcf2bf3b98fdbb1e8c5cc49 (diff)
downloadFreeBSD-src-8cd894ca7009ef10fdf67d1a9583636aaf3b2c6f.zip
FreeBSD-src-8cd894ca7009ef10fdf67d1a9583636aaf3b2c6f.tar.gz
More caddr_t removal.
Change struct knote's kn_hook from caddr_t to void *.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_event.c14
-rw-r--r--sys/kern/kern_lockf.c6
-rw-r--r--sys/kern/kern_subr.c8
-rw-r--r--sys/kern/subr_prf.c2
-rw-r--r--sys/kern/uipc_sockbuf.c14
-rw-r--r--sys/kern/uipc_socket.c4
-rw-r--r--sys/kern/uipc_socket2.c14
7 files changed, 31 insertions, 31 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 3e2cbf7..46d57c9 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -334,7 +334,7 @@ filt_timerattach(struct knote *kn)
M_KQUEUE, M_WAITOK);
callout_init(calloutp, 0);
callout_reset(calloutp, tticks, filt_timerexpire, kn);
- kn->kn_hook = (caddr_t)calloutp;
+ kn->kn_hook = calloutp;
return (0);
}
@@ -380,7 +380,7 @@ kqueue(struct thread *td, struct kqueue_args *uap)
fp->f_type = DTYPE_KQUEUE;
fp->f_ops = &kqueueops;
TAILQ_INIT(&kq->kq_head);
- fp->f_data = (caddr_t)kq;
+ fp->f_data = kq;
FILE_UNLOCK(fp);
FILEDESC_LOCK(fdp);
td->td_retval[0] = fd;
@@ -446,8 +446,8 @@ kevent(struct thread *td, struct kevent_args *uap)
if (uap->nevents != 0) {
kevp->flags = EV_ERROR;
kevp->data = error;
- (void) copyout((caddr_t)kevp,
- (caddr_t)uap->eventlist,
+ (void) copyout(kevp,
+ uap->eventlist,
sizeof(*kevp));
uap->eventlist++;
uap->nevents--;
@@ -751,7 +751,7 @@ start:
count--;
if (nkev == KQ_NEVENTS) {
splx(s);
- error = copyout((caddr_t)&kq->kq_kev, (caddr_t)ulistp,
+ error = copyout(&kq->kq_kev, ulistp,
sizeof(struct kevent) * nkev);
ulistp += nkev;
nkev = 0;
@@ -765,7 +765,7 @@ start:
splx(s);
done:
if (nkev != 0)
- error = copyout((caddr_t)&kq->kq_kev, (caddr_t)ulistp,
+ error = copyout(&kq->kq_kev, ulistp,
sizeof(struct kevent) * nkev);
td->td_retval[0] = maxevents - count;
return (error);
@@ -980,7 +980,7 @@ retry:
FILEDESC_LOCK(fdp);
goto retry;
}
- bcopy((caddr_t)fdp->fd_knlist, (caddr_t)list,
+ bcopy(fdp->fd_knlist, list,
fdp->fd_knlistsize * sizeof(struct klist *));
bzero((caddr_t)list +
fdp->fd_knlistsize * sizeof(struct klist *),
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c
index 5e47a0c..c1cadb1 100644
--- a/sys/kern/kern_lockf.c
+++ b/sys/kern/kern_lockf.c
@@ -298,7 +298,7 @@ lf_setlock(lock)
lf_printlist("lf_setlock", block);
}
#endif /* LOCKF_DEBUG */
- error = tsleep((caddr_t)lock, priority, lockstr, 0);
+ error = tsleep(lock, priority, lockstr, 0);
/*
* We may have been awakened by a signal and/or by a
* debugger continuing us (in which cases we must remove
@@ -726,7 +726,7 @@ lf_split(lock1, lock2)
* the encompassing lock
*/
MALLOC(splitlock, struct lockf *, sizeof *splitlock, M_LOCKF, M_WAITOK);
- bcopy((caddr_t)lock1, (caddr_t)splitlock, sizeof *splitlock);
+ bcopy(lock1, splitlock, sizeof *splitlock);
splitlock->lf_start = lock2->lf_end + 1;
TAILQ_INIT(&splitlock->lf_blkhd);
lock1->lf_end = lock2->lf_start - 1;
@@ -755,7 +755,7 @@ lf_wakelock(listhead)
if (lockf_debug & 2)
lf_print("lf_wakelock: awakening", wakelock);
#endif /* LOCKF_DEBUG */
- wakeup((caddr_t)wakelock);
+ wakeup(wakelock);
}
}
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index b88b1c1..5e32eee 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -186,9 +186,9 @@ uiomove(cp, n, uio)
case UIO_SYSSPACE:
if (uio->uio_rw == UIO_READ)
- bcopy((caddr_t)cp, iov->iov_base, cnt);
+ bcopy(cp, iov->iov_base, cnt);
else
- bcopy(iov->iov_base, (caddr_t)cp, cnt);
+ bcopy(iov->iov_base, cp, cnt);
break;
case UIO_NOCOPY:
break;
@@ -340,9 +340,9 @@ uiomoveco(cp, n, uio, obj, disposable)
case UIO_SYSSPACE:
if (uio->uio_rw == UIO_READ)
- bcopy((caddr_t)cp, iov->iov_base, cnt);
+ bcopy(cp, iov->iov_base, cnt);
else
- bcopy(iov->iov_base, (caddr_t)cp, cnt);
+ bcopy(iov->iov_base, cp, cnt);
break;
case UIO_NOCOPY:
break;
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 4735527..7f9b790 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -254,7 +254,7 @@ log_console(struct uio *uio)
iovlen = uio->uio_iovcnt * sizeof (struct iovec);
MALLOC(miov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
MALLOC(consbuffer, char *, CONSCHUNK, M_TEMP, M_WAITOK);
- bcopy((caddr_t)muio.uio_iov, (caddr_t)miov, iovlen);
+ bcopy(muio.uio_iov, miov, iovlen);
muio.uio_iov = miov;
uio = &muio;
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index a9a4162..1e68f83 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -145,7 +145,7 @@ soisdisconnecting(so)
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
- wakeup((caddr_t)&so->so_timeo);
+ wakeup(&so->so_timeo);
sowwakeup(so);
sorwakeup(so);
}
@@ -157,7 +157,7 @@ soisdisconnected(so)
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED);
- wakeup((caddr_t)&so->so_timeo);
+ wakeup(&so->so_timeo);
sowwakeup(so);
sorwakeup(so);
}
@@ -216,7 +216,7 @@ sonewconn(head, connstatus)
}
if (connstatus) {
sorwakeup(head);
- wakeup((caddr_t)&head->so_timeo);
+ wakeup(&head->so_timeo);
so->so_state |= connstatus;
}
return (so);
@@ -259,7 +259,7 @@ sbwait(sb)
{
sb->sb_flags |= SB_WAIT;
- return (tsleep((caddr_t)&sb->sb_cc,
+ return (tsleep(&sb->sb_cc,
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
sb->sb_timeo));
}
@@ -276,7 +276,7 @@ sb_lock(sb)
while (sb->sb_flags & SB_LOCK) {
sb->sb_flags |= SB_WANT;
- error = tsleep((caddr_t)&sb->sb_flags,
+ error = tsleep(&sb->sb_flags,
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK|PCATCH,
"sblock", 0);
if (error)
@@ -301,7 +301,7 @@ sowakeup(so, sb)
sb->sb_flags &= ~SB_SEL;
if (sb->sb_flags & SB_WAIT) {
sb->sb_flags &= ~SB_WAIT;
- wakeup((caddr_t)&sb->sb_cc);
+ wakeup(&sb->sb_cc);
}
if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL)
pgsigio(&so->so_sigio, SIGIO, 0);
@@ -605,7 +605,7 @@ sbappendaddr(sb, asa, m0, control)
if (m == 0)
return (0);
m->m_len = asa->sa_len;
- bcopy((caddr_t)asa, mtod(m, caddr_t), asa->sa_len);
+ bcopy(asa, mtod(m, caddr_t), asa->sa_len);
if (n)
n->m_next = m0; /* concatenate data to control */
else
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 7cc27d3..d596294 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -348,7 +348,7 @@ soclose(so)
(so->so_state & SS_NBIO))
goto drop;
while (so->so_state & SS_ISCONNECTED) {
- error = tsleep((caddr_t)&so->so_timeo,
+ error = tsleep(&so->so_timeo,
PSOCK | PCATCH, "soclos", so->so_linger * hz);
if (error)
break;
@@ -1116,7 +1116,7 @@ sorflush(so)
socantrcvmore(so);
sbunlock(sb);
asb = *sb;
- bzero((caddr_t)sb, sizeof (*sb));
+ bzero(sb, sizeof (*sb));
splx(s);
if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose)
(*pr->pr_domain->dom_dispose)(asb.sb_mb);
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index a9a4162..1e68f83 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -145,7 +145,7 @@ soisdisconnecting(so)
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
- wakeup((caddr_t)&so->so_timeo);
+ wakeup(&so->so_timeo);
sowwakeup(so);
sorwakeup(so);
}
@@ -157,7 +157,7 @@ soisdisconnected(so)
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED);
- wakeup((caddr_t)&so->so_timeo);
+ wakeup(&so->so_timeo);
sowwakeup(so);
sorwakeup(so);
}
@@ -216,7 +216,7 @@ sonewconn(head, connstatus)
}
if (connstatus) {
sorwakeup(head);
- wakeup((caddr_t)&head->so_timeo);
+ wakeup(&head->so_timeo);
so->so_state |= connstatus;
}
return (so);
@@ -259,7 +259,7 @@ sbwait(sb)
{
sb->sb_flags |= SB_WAIT;
- return (tsleep((caddr_t)&sb->sb_cc,
+ return (tsleep(&sb->sb_cc,
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
sb->sb_timeo));
}
@@ -276,7 +276,7 @@ sb_lock(sb)
while (sb->sb_flags & SB_LOCK) {
sb->sb_flags |= SB_WANT;
- error = tsleep((caddr_t)&sb->sb_flags,
+ error = tsleep(&sb->sb_flags,
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK|PCATCH,
"sblock", 0);
if (error)
@@ -301,7 +301,7 @@ sowakeup(so, sb)
sb->sb_flags &= ~SB_SEL;
if (sb->sb_flags & SB_WAIT) {
sb->sb_flags &= ~SB_WAIT;
- wakeup((caddr_t)&sb->sb_cc);
+ wakeup(&sb->sb_cc);
}
if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL)
pgsigio(&so->so_sigio, SIGIO, 0);
@@ -605,7 +605,7 @@ sbappendaddr(sb, asa, m0, control)
if (m == 0)
return (0);
m->m_len = asa->sa_len;
- bcopy((caddr_t)asa, mtod(m, caddr_t), asa->sa_len);
+ bcopy(asa, mtod(m, caddr_t), asa->sa_len);
if (n)
n->m_next = m0; /* concatenate data to control */
else
OpenPOWER on IntegriCloud