svn commit: r247119 - stable/8/sys/geom/raid

Alexander Motin mav at FreeBSD.org
Thu Feb 21 19:35:46 UTC 2013


Author: mav
Date: Thu Feb 21 19:35:45 2013
New Revision: 247119
URL: http://svnweb.freebsd.org/changeset/base/247119

Log:
  MFC r241418:
  NULL-ify last previously used pointer instead of last possible pointer.
  This should be only a cosmetic change.

Modified:
  stable/8/sys/geom/raid/md_promise.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/geom/   (props changed)

Modified: stable/8/sys/geom/raid/md_promise.c
==============================================================================
--- stable/8/sys/geom/raid/md_promise.c	Thu Feb 21 19:23:35 2013	(r247118)
+++ stable/8/sys/geom/raid/md_promise.c	Thu Feb 21 19:35:45 2013	(r247119)
@@ -590,7 +590,7 @@ g_raid_md_promise_purge_disks(struct g_r
 			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;
 		}
@@ -695,7 +695,7 @@ g_raid_md_promise_start_disk(struct g_ra
 			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. */
@@ -1144,7 +1144,7 @@ g_raid_md_taste_promise(struct g_raid_md
 		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--;
 	}
 


More information about the svn-src-all mailing list