summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-11-20 23:00:59 +0000
committerdas <das@FreeBSD.org>2004-11-20 23:00:59 +0000
commit6175c08488edf2a144f21145ecb8c7ced37c3bbb (patch)
treeeaa83ea2ab9f7a13934ceeef53104c6151eae2c3 /sys/kern/kern_fork.c
parentfeeee6f8b5e72ea3f0baa19c2a36457d49e50784 (diff)
downloadFreeBSD-src-6175c08488edf2a144f21145ecb8c7ced37c3bbb.zip
FreeBSD-src-6175c08488edf2a144f21145ecb8c7ced37c3bbb.tar.gz
Remove local definitions of RANGEOF() and use __rangeof() instead.
Also remove a few bogus casts.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 2e9830a..fe3601e 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -467,22 +467,19 @@ again:
PROC_LOCK(p2);
PROC_LOCK(p1);
-#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start))
-
bzero(&p2->p_startzero,
- (unsigned) RANGEOF(struct proc, p_startzero, p_endzero));
+ __rangeof(struct proc, p_startzero, p_endzero));
bzero(&td2->td_startzero,
- (unsigned) RANGEOF(struct thread, td_startzero, td_endzero));
+ __rangeof(struct thread, td_startzero, td_endzero));
bzero(&kg2->kg_startzero,
- (unsigned) RANGEOF(struct ksegrp, kg_startzero, kg_endzero));
+ __rangeof(struct ksegrp, kg_startzero, kg_endzero));
bcopy(&p1->p_startcopy, &p2->p_startcopy,
- (unsigned) RANGEOF(struct proc, p_startcopy, p_endcopy));
+ __rangeof(struct proc, p_startcopy, p_endcopy));
bcopy(&td->td_startcopy, &td2->td_startcopy,
- (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy));
+ __rangeof(struct thread, td_startcopy, td_endcopy));
bcopy(&td->td_ksegrp->kg_startcopy, &kg2->kg_startcopy,
- (unsigned) RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy));
-#undef RANGEOF
+ __rangeof(struct ksegrp, kg_startcopy, kg_endcopy));
td2->td_sigstk = td->td_sigstk;
OpenPOWER on IntegriCloud