diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2000-11-15 20:07:16 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2000-11-15 20:07:16 +0000 |
| commit | 324d6bacc3727e33838058b7b6720900d5c99085 (patch) | |
| tree | 9c40081e28a5bf2788c5b82054714d418c48a702 /sys/kern/subr_rman.c | |
| parent | a436e6e696fc35f625614f580e53c4503e3e598b (diff) | |
Notes
Diffstat (limited to 'sys/kern/subr_rman.c')
| -rw-r--r-- | sys/kern/subr_rman.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index e1df7cfffdf8..c3f7fafac1aa 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. */ |
