summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 97707d0..8d06848 100644
--- a/util.c
+++ b/util.c
@@ -179,7 +179,7 @@ int enough(int level, int raid_disks, int layout,
/* This is the tricky one - we need to check
* which actual disks are present.
*/
- copies = (layout&255)* (layout>>8);
+ copies = (layout&255)* ((layout>>8) & 255);
first=0;
do {
/* there must be one of the 'copies' form 'first' */