From c70db66daf9fd625eb83352c423f86837168bcc2 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Thu, 10 Apr 2008 10:55:59 +0000 Subject: [PATCH] no endless loop --- zypp/Patch.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zypp/Patch.cc b/zypp/Patch.cc index 3d91703..b90cdf3 100644 --- a/zypp/Patch.cc +++ b/zypp/Patch.cc @@ -75,11 +75,11 @@ namespace zypp Patch::Contents Patch::contents() const { Contents result; - const sat::LookupAttr::iterator _col_name_it = sat::LookupAttr( sat::SolvAttr::updateCollectionName, *this ).begin(); - const sat::LookupAttr::iterator _col_evr_it = sat::LookupAttr( sat::SolvAttr::updateCollectionEvr, *this ).begin(); - const sat::LookupAttr::iterator _col_arch_it = sat::LookupAttr( sat::SolvAttr::updateCollectionArch, *this ).begin(); + sat::LookupAttr::iterator _col_name_it(sat::LookupAttr( sat::SolvAttr::updateCollectionName, *this ).begin()); + sat::LookupAttr::iterator _col_evr_it(sat::LookupAttr( sat::SolvAttr::updateCollectionEvr, *this ).begin()); + sat::LookupAttr::iterator _col_arch_it(sat::LookupAttr( sat::SolvAttr::updateCollectionArch, *this ).begin()); - while (_col_name_it != sat::LookupAttr( sat::SolvAttr::updateCollectionName, *this ).end()) + for (;_col_name_it != sat::LookupAttr( sat::SolvAttr::updateCollectionName, *this ).end(); ++_col_name_it, ++_col_evr_it, ++_col_arch_it) { /* safety checks, shouldn't happen (tm) */ if (_col_evr_it == sat::LookupAttr( sat::SolvAttr::updateCollectionEvr, *this ).end() -- 2.7.4