Fix a warining

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-12-06 07:03:58 +01:00
parent 8ff84951c5
commit 925d998e6f

View file

@ -843,6 +843,9 @@ read_device (grub_uint64_t sector, struct grub_zfs_device_desc *desc,
{
grub_err_t err;
unsigned i;
if (desc->n_children <= 0)
return grub_error (GRUB_ERR_BAD_FS,
"non-positive number of mirror children");
for (i = 0; i < desc->n_children; i++)
{
err = read_device (sector, &desc->children[i],