summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_rman.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2000-11-15 20:07:16 +0000
committermckusick <mckusick@FreeBSD.org>2000-11-15 20:07:16 +0000
commita998a30253c7ec46ca45813b4639379c21e31702 (patch)
treef3f1e3037cfeba917ff630254f80c72c1ee0e3db /sys/kern/subr_rman.c
parenta1bbb80e56509c4874c58d53fa35fce34a9c90c9 (diff)
downloadFreeBSD-src-a998a30253c7ec46ca45813b4639379c21e31702.zip
FreeBSD-src-a998a30253c7ec46ca45813b4639379c21e31702.tar.gz
Bug fix for revision 1.14 on the replacement of CIRCLEQ with TAILQ.
Submitted by: Warner Losh <imp@village.org>
Diffstat (limited to 'sys/kern/subr_rman.c')
-rw-r--r--sys/kern/subr_rman.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index e1df7cf..c3f7faf 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -535,8 +535,8 @@ int_rman_release_resource(struct rman *rm, struct resource *r)
s = TAILQ_PREV(r, resource_head, r_link);
t = TAILQ_NEXT(r, r_link);
- if (s != (void *)&rm->rm_list && (s->r_flags & RF_ALLOCATED) == 0
- && t != (void *)&rm->rm_list && (t->r_flags & RF_ALLOCATED) == 0) {
+ if (s != NULL && (s->r_flags & RF_ALLOCATED) == 0
+ && t != NULL && (t->r_flags & RF_ALLOCATED) == 0) {
/*
* Merge all three segments.
*/
@@ -544,15 +544,13 @@ int_rman_release_resource(struct rman *rm, struct resource *r)
TAILQ_REMOVE(&rm->rm_list, r, r_link);
TAILQ_REMOVE(&rm->rm_list, t, r_link);
free(t, M_RMAN);
- } else if (s != (void *)&rm->rm_list
- && (s->r_flags & RF_ALLOCATED) == 0) {
+ } else if (s != NULL && (s->r_flags & RF_ALLOCATED) == 0) {
/*
* Merge previous segment with ours.
*/
s->r_end = r->r_end;
TAILQ_REMOVE(&rm->rm_list, r, r_link);
- } else if (t != (void *)&rm->rm_list
- && (t->r_flags & RF_ALLOCATED) == 0) {
+ } else if (t != NULL && (t->r_flags & RF_ALLOCATED) == 0) {
/*
* Merge next segment with ours.
*/
OpenPOWER on IntegriCloud