svn commit: r254269 - head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Tue Aug 13 06:21:37 UTC 2013
Author: mav
Date: Tue Aug 13 06:21:36 2013
New Revision: 254269
URL: http://svnweb.freebsd.org/changeset/base/254269
Log:
Fix reasonable but safe Clang warnings.
Modified:
head/sys/geom/raid/tr_raid5.c
Modified: head/sys/geom/raid/tr_raid5.c
==============================================================================
--- head/sys/geom/raid/tr_raid5.c Tue Aug 13 03:10:39 2013 (r254268)
+++ head/sys/geom/raid/tr_raid5.c Tue Aug 13 06:21:36 2013 (r254269)
@@ -106,7 +106,8 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
trs = (struct g_raid_tr_raid5_object *)tr;
qual = tr->tro_volume->v_raid_level_qualifier;
if (tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID4 &&
- qual >= 0 && qual <= 1) {
+ (qual == G_RAID_VOLUME_RLQ_R4P0 ||
+ qual == G_RAID_VOLUME_RLQ_R4P0)) {
/* RAID4 */
} else if ((tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 ||
tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5E ||
@@ -114,7 +115,10 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5R ||
tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID6 ||
tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAIDMDF) &&
- qual >= 0 && qual <= 3) {
+ (qual == G_RAID_VOLUME_RLQ_R5RA ||
+ qual == G_RAID_VOLUME_RLQ_R5RS ||
+ qual == G_RAID_VOLUME_RLQ_R5LA ||
+ qual == G_RAID_VOLUME_RLQ_R5LS)) {
/* RAID5/5E/5EE/5R/6/MDF */
} else
return (G_RAID_TR_TASTE_FAIL);
More information about the svn-src-all
mailing list