From aae4b38e6979c84ac888d7cde3f68533199f47e0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 27 Sep 2018 03:44:39 -0400 Subject: [PATCH] [fsresizer] Fix endless loop - Improve variable names - Missing iterator++ --- src/modules/fsresizer/ResizeFSJob.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/fsresizer/ResizeFSJob.cpp b/src/modules/fsresizer/ResizeFSJob.cpp index e3820e535..06429699b 100644 --- a/src/modules/fsresizer/ResizeFSJob.cpp +++ b/src/modules/fsresizer/ResizeFSJob.cpp @@ -120,14 +120,14 @@ ResizeFSJob::exec() using DeviceList = QList< Device* >; DeviceList devices = backend_p->scanDevices( false ); cDebug() << "ResizeFSJob found" << devices.count() << "devices."; - for ( DeviceList::iterator it = devices.begin(); it != devices.end(); ) + for ( DeviceList::iterator dev_it = devices.begin(); dev_it != devices.end(); ++dev_it ) { - if ( ! (*it) ) + if ( ! (*dev_it) ) continue; - cDebug() << "ResizeFSJob found" << ( *it )->deviceNode(); - for ( auto pit = PartitionIterator::begin( *it); pit != PartitionIterator::end( *it); ++pit ) + cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode(); + for ( auto part_it = PartitionIterator::begin( *dev_it); part_it != PartitionIterator::end( *dev_it ); ++part_it ) { - cDebug() << ".." << ( *pit )->mountPoint(); + cDebug() << ".." << ( *part_it )->mountPoint(); } }