[gnome-packagekit/gnome-2-28] bugfix: don't cache the length of the deps array if we are removing items from it



commit 13193ec9a319d63d8a8a87f8485fbb526bef3367
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 27 10:00:33 2009 +0000

    bugfix: don't cache the length of the deps array if we are removing items from it

 src/gpk-helper-deps-install.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-helper-deps-install.c b/src/gpk-helper-deps-install.c
index 3f28c40..73076ef 100644
--- a/src/gpk-helper-deps-install.c
+++ b/src/gpk-helper-deps-install.c
@@ -72,8 +72,7 @@ gpk_helper_deps_install_show (GpkHelperDepsInstall *helper, PkPackageList *packa
 	guint i;
 
 	/* remove cleanup packages */
-	length = pk_package_list_get_size (deps_list);
-	for (i=0; i<length; i++) {
+	for (i=0; i<pk_package_list_get_size (deps_list); i++) {
 		obj = pk_package_list_get_obj (deps_list, i);
 		if (obj->info == PK_INFO_ENUM_CLEANUP ||
 		    obj->info == PK_INFO_ENUM_FINISHED) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]