diff options
author | mav <mav@FreeBSD.org> | 2012-10-10 20:41:37 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-10-10 20:41:37 +0000 |
commit | 7849b3fa4d9df854109e7ad2d649585d459a0176 (patch) | |
tree | 8692b7a0eb8107ac39c415c17b75d72d449ad4a4 /sys/geom | |
parent | d69f5fddc1dcec152c150df746374983ef6e66e5 (diff) | |
download | FreeBSD-src-7849b3fa4d9df854109e7ad2d649585d459a0176.zip FreeBSD-src-7849b3fa4d9df854109e7ad2d649585d459a0176.tar.gz |
NULL-ify last previously used pointer instead of last possible pointer.
This should be only a cosmetic change.
Found by: Clang Static Analyzer
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/raid/md_promise.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c index b9d667a..cd50a40 100644 --- a/sys/geom/raid/md_promise.c +++ b/sys/geom/raid/md_promise.c @@ -544,7 +544,7 @@ g_raid_md_promise_purge_disks(struct g_raid_softc *sc) free(pd->pd_meta[i], M_MD_PROMISE); for (j = i; j < pd->pd_subdisks - 1; j++) pd->pd_meta[j] = pd->pd_meta[j + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; pd->pd_updated = 1; } @@ -650,7 +650,7 @@ g_raid_md_promise_start_disk(struct g_raid_disk *disk, int sdn, free(pd->pd_meta[sdn], M_MD_PROMISE); for (i = sdn; i < pd->pd_subdisks - 1; i++) pd->pd_meta[i] = pd->pd_meta[i + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; } /* If we are in the start process, that's all for now. */ @@ -1094,7 +1094,7 @@ g_raid_md_taste_promise(struct g_raid_md_object *md, struct g_class *mp, free(metaarr[i], M_MD_PROMISE); for (j = i; j < subdisks - 1; j++) metaarr[i] = metaarr[j + 1]; - metaarr[PROMISE_MAX_SUBDISKS - 1] = NULL; + metaarr[subdisks - 1] = NULL; subdisks--; } |