1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: avoid declaring var in the middle of code

Easier to read code.
This commit is contained in:
Zdenek Kabelac 2016-04-12 11:46:41 +02:00
parent 147c9c01a2
commit 0f7975cb35

View File

@ -904,11 +904,11 @@ int dev_cache_index_devs(void)
} else if (!sysfs_has_dev_block)
return 1;
int with_udev = obtain_device_list_from_udev() &&
udev_get_library_context();
if (obtain_device_list_from_udev() &&
udev_get_library_context())
return _dev_cache_iterate_devs_for_index(); /* with udev */
return with_udev ? _dev_cache_iterate_devs_for_index()
: _dev_cache_iterate_sysfs_for_index(path);
return _dev_cache_iterate_sysfs_for_index(path);
}
#ifdef UDEV_SYNC_SUPPORT