]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Query.c
mdadm-1.0.0
[thirdparty/mdadm.git] / Query.c
diff --git a/Query.c b/Query.c
index c65d83a03e732f8bebea3ba4b2a7c5a3c43dbc4a..ea5bca6e0ab2f4b1f7870773075a534be4b3a93c 100644 (file)
--- a/Query.c
+++ b/Query.c
@@ -71,9 +71,10 @@ int Query(char *dev)
                        ;
                else
 #endif
-                       if (ioctl(fd, BLKGETSIZE, &array_size)==0)
-                               larray_size = array_size<<9;
-                       else larray_size = 0;
+                       if (ioctl(fd, BLKGETSIZE, &array_size)==0) {
+                               larray_size = array_size;
+                               larray_size <<= 9;
+                       } else larray_size = 0;
        }
        close(fd);