From: Duncan Mac-Vicar P Date: Thu, 10 Apr 2008 10:55:59 +0000 (+0000) Subject: no endless loop X-Git-Tag: BASE-SuSE-Linux-11_0-Branch~302 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c70db66daf9fd625eb83352c423f86837168bcc2;p=platform%2Fupstream%2Flibzypp.git no endless loop --- 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()