master - cleanup: avoid declaring var in the middle of code
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0f7975cb351158d3b2245b4262761a698c6c5d7b Commit: 0f7975cb351158d3b2245b4262761a698c6c5d7b Parent: 147c9c01a21687b82314a62571cfc390a9a606a8 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Apr 12 11:46:41 2016 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Apr 12 11:47:51 2016 +0200
cleanup: avoid declaring var in the middle of code
Easier to read code.
--- lib/device/dev-cache.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
lib/device/dev-cache.c +4 -4
@@ -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