1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +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) } else if (!sysfs_has_dev_block)
return 1; return 1;
int with_udev = obtain_device_list_from_udev() && if (obtain_device_list_from_udev() &&
udev_get_library_context(); udev_get_library_context())
return _dev_cache_iterate_devs_for_index(); /* with udev */
return with_udev ? _dev_cache_iterate_devs_for_index() return _dev_cache_iterate_sysfs_for_index(path);
: _dev_cache_iterate_sysfs_for_index(path);
} }
#ifdef UDEV_SYNC_SUPPORT #ifdef UDEV_SYNC_SUPPORT