From 7a7283728b3e1663c80810d2650d1705a8db4eff Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 14 Feb 2010 16:28:40 +0000 Subject: [PATCH 2/3] Rename subiter to system_dir_iter to match logic for header files The name @subiter doesn't seem appropriate; it iterates over a separate list, not over an item of @iter. Also remove some trailing whitespace. --- pkg.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg.c b/pkg.c index 3099b43..66d10f6 100644 --- a/pkg.c +++ b/pkg.c @@ -944,12 +944,14 @@ verify_package (Package *pkg) iter = pkg->L_libs; while (iter != NULL) { - GSList *subiter = system_directories; - while (subiter != NULL) + GSList *system_dir_iter = system_directories; + + while (system_dir_iter != NULL) { gboolean is_system = FALSE; const char *linker_arg = iter->data; - const char *system_libpath = subiter->data; + const char *system_libpath = system_dir_iter->data; + if (strncmp (linker_arg, "-L ", 3) == 0 && strcmp (linker_arg + 3, system_libpath) == 0) is_system = TRUE; @@ -961,14 +963,14 @@ verify_package (Package *pkg) debug_spew ("Package %s has -L %s in Libs\n", pkg->name, system_libpath); if (g_getenv ("PKG_CONFIG_ALLOW_SYSTEM_LIBS") == NULL) - { + { iter->data = NULL; ++count; debug_spew ("Removing -L %s from libs for %s\n", system_libpath, pkg->key); break; } } - subiter = subiter->next; + system_dir_iter = system_dir_iter->next; } iter = iter->next; } -- 1.7.4.1