summaryrefslogtreecommitdiff
path: root/super-intel.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-06-04 12:29:21 +1000
committerNeilBrown <neilb@suse.de>2009-06-04 12:29:21 +1000
commit4291d691b66f65695b5b4be22b80fd00da73b544 (patch)
tree6b9d8054343e352608b940517051a588bfa54d67 /super-intel.c
parent6e92d480f765dc22a5abaa5658ad603353648c1c (diff)
downloadmdadm-4291d691b66f65695b5b4be22b80fd00da73b544.tar.gz
super-intel: fix test on failed_disk_num.
We sometimes set failed_disk_num to ~0. However we cannot test for equality with that as failed_disk_num is 8bit and ~0 is probably 32bit with lots of 1's. So test if ~failed_disk_num is 0 instead. Reported-By: "Mr. James W. Laferriere" <babydr@baby-dragons.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index 73fe5fa..7e2a086 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -3629,7 +3629,7 @@ static int mark_failure(struct imsm_dev *dev, struct imsm_disk *disk, int idx)
disk->status |= FAILED_DISK;
set_imsm_ord_tbl_ent(map, slot, idx | IMSM_ORD_REBUILD);
- if (map->failed_disk_num == ~0)
+ if (~map->failed_disk_num == 0)
map->failed_disk_num = slot;
return 1;
}