From: Christophe Varoqui Date: Wed, 19 Jul 2006 12:40:46 +0000 (+0200) Subject: [multipathd] sweets X-Git-Tag: 0.4.8~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52235d7ba4ffe480c56e684c53b6425da3aa33eb;p=platform%2Fupstream%2Fmultipath-tools.git [multipathd] sweets - vector_foreach_slot takes an unsigned i - don't use old-style initializer for setscheduler's sched_param Bernhard Fischer --- diff --git a/multipathd/main.c b/multipathd/main.c index 91a1597..0b70714 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -77,7 +77,7 @@ need_switch_pathgroup (struct multipath * mpp, int refresh) { struct pathgroup * pgp; struct path * pp; - int i, j; + unsigned int i, j; if (!mpp || mpp->pgfailback == -FAILBACK_MANUAL) return 0; @@ -112,7 +112,8 @@ coalesce_maps(struct vectors *vecs, vector nmpv) { struct multipath * ompp; vector ompv = vecs->mpvec; - int i, j; + unsigned int i; + int j; vector_foreach_slot (ompv, ompp, i) { if (!find_mp_by_wwid(nmpv, ompp->wwid)) { @@ -149,9 +150,9 @@ coalesce_maps(struct vectors *vecs, vector nmpv) static void sync_map_state(struct multipath *mpp) { - int i, j; struct pathgroup *pgp; struct path *pp; + unsigned int i, j; vector_foreach_slot (mpp->pg, pgp, i){ vector_foreach_slot (pgp->paths, pp, j){ @@ -173,7 +174,7 @@ sync_map_state(struct multipath *mpp) static void sync_maps_state(vector mpvec) { - int i; + unsigned int i; struct multipath *mpp; vector_foreach_slot (mpvec, mpp, i) @@ -569,8 +570,8 @@ out: static int map_discovery (struct vectors * vecs) { - int i; struct multipath * mpp; + unsigned int i; if (dm_get_maps(vecs->mpvec, "multipath")) return 1; @@ -800,7 +801,7 @@ static void mpvec_garbage_collector (struct vectors * vecs) { struct multipath * mpp; - int i; + unsigned int i; vector_foreach_slot (vecs->mpvec, mpp, i) { if (mpp && mpp->alias && !dm_map_present(mpp->alias)) { @@ -815,7 +816,7 @@ static void defered_failback_tick (vector mpvec) { struct multipath * mpp; - int i; + unsigned int i; vector_foreach_slot (mpvec, mpp, i) { /* @@ -834,7 +835,7 @@ static void retry_count_tick(vector mpvec) { struct multipath *mpp; - int i; + unsigned int i; vector_foreach_slot (mpvec, mpp, i) { if (mpp->retry_tick) { @@ -853,8 +854,9 @@ checkerloop (void *ap) { struct vectors *vecs; struct path *pp; - int i, count = 0; + int count = 0; int newstate; + unsigned int i; mlockall(MCL_CURRENT | MCL_FUTURE); vecs = (struct vectors *)ap; @@ -1210,7 +1212,7 @@ setscheduler (void) { int res; static struct sched_param sched_param = { - sched_priority: 99 + .sched_priority = 99 }; res = sched_setscheduler (0, SCHED_RR, &sched_param);