summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2011-03-29 11:12:16 -0400
committerJiri Moskovcak <jmoskovc@redhat.com>2011-03-29 20:28:24 +0200
commitd6783b83ecce7a8b63cad69216f178d02b774546 (patch)
tree86c613c576d1a52b4522842c7816cc2b64f110a1 /src/daemon
parent5cc34d7d4e636c083b2722645778f78bf30c71cb (diff)
downloadabrt-d6783b83ecce7a8b63cad69216f178d02b774546.zip
abrt-d6783b83ecce7a8b63cad69216f178d02b774546.tar.gz
abrt-d6783b83ecce7a8b63cad69216f178d02b774546.tar.xz
all: don't declare variables inside for loops
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/abrt-action-save-package-data.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
index 34905b6..e58b425 100644
--- a/src/daemon/abrt-action-save-package-data.c
+++ b/src/daemon/abrt-action-save-package-data.c
@@ -64,7 +64,8 @@ static char *get_argv1_if_full_path(const char* cmdline)
static bool is_path_blacklisted(const char *path)
{
- for (GList *li = g_settings_setBlackListedPaths; li != NULL; li = g_list_next(li))
+ GList *li;
+ for (li = g_settings_setBlackListedPaths; li != NULL; li = g_list_next(li))
{
if (fnmatch((char*)li->data, path, /*flags:*/ 0) == 0)
{
@@ -184,7 +185,9 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name)
package_short_name = get_package_name_from_NVR_or_NULL(package_full_name);
VERB2 log("Package:'%s' short:'%s'", package_full_name, package_short_name);
- for (GList *li = g_settings_setBlackListedPkgs; li != NULL; li = g_list_next(li))
+ GList *li;
+
+ for (li = g_settings_setBlackListedPkgs; li != NULL; li = g_list_next(li))
{
if (strcmp((char*)li->data, package_short_name) == 0)
{
@@ -278,7 +281,8 @@ int main(int argc, char **argv)
VERB1 log("Initializing rpm library");
rpm_init();
- for (GList *li = g_settings_setOpenGPGPublicKeys; li != NULL; li = g_list_next(li))
+ GList *li;
+ for (li = g_settings_setOpenGPGPublicKeys; li != NULL; li = g_list_next(li))
{
VERB1 log("Loading GPG key '%s'", (char*)li->data);
rpm_load_gpgkey((char*)li->data);