[gnome-software] Declare GList *l for loop control variable using C99 style
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Declare GList *l for loop control variable using C99 style
- Date: Thu, 1 Mar 2018 08:24:05 +0000 (UTC)
commit 40eaa5f19a03ef90bd04532744b3280c3bcdd59d
Author: Kalev Lember <klember redhat com>
Date: Thu Mar 1 09:17:19 2018 +0100
Declare GList *l for loop control variable using C99 style
lib/gs-app.c | 5 ++---
lib/gs-auth.c | 6 ++----
lib/gs-plugin-loader.c | 9 +++------
plugins/core/gs-appstream.c | 6 ++----
plugins/core/gs-plugin-appstream.c | 8 +++-----
plugins/core/gs-plugin-key-colors.c | 3 +--
plugins/flatpak/gs-flatpak.c | 3 +--
plugins/limba/gs-plugin-limba.c | 3 +--
plugins/modalias/gs-plugin-modalias.c | 3 +--
plugins/odrs/gs-plugin-odrs.c | 3 +--
plugins/steam/gs-plugin-steam.c | 3 +--
src/gs-app-folder-dialog.c | 3 +--
src/gs-application.c | 3 +--
src/gs-details-page.c | 3 +--
src/gs-extras-page.c | 9 +++------
src/gs-installed-page.c | 25 +++++++++----------------
src/gs-updates-page.c | 3 +--
17 files changed, 34 insertions(+), 64 deletions(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index ab717f8a..aab2c5b6 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -392,7 +392,6 @@ gs_app_to_string_append (GsApp *app, GString *str)
GsAppPrivate *priv = gs_app_get_instance_private (app);
AsImage *im;
GList *keys;
- GList *l;
const gchar *tmp;
guint i;
@@ -510,7 +509,7 @@ gs_app_to_string_append (GsApp *app, GString *str)
if (tmp != NULL)
gs_app_kv_lpad (str, "url{homepage}", tmp);
keys = g_hash_table_get_keys (priv->launchables);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
g_autofree gchar *key = NULL;
key = g_strdup_printf ("launchable{%s}", (const gchar *) l->data);
tmp = g_hash_table_lookup (priv->launchables, l->data);
@@ -595,7 +594,7 @@ gs_app_to_string_append (GsApp *app, GString *str)
}
}
keys = g_hash_table_get_keys (priv->metadata);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
GVariant *val;
const GVariantType *val_type;
g_autofree gchar *key = NULL;
diff --git a/lib/gs-auth.c b/lib/gs-auth.c
index a60175f3..78c6aef9 100644
--- a/lib/gs-auth.c
+++ b/lib/gs-auth.c
@@ -456,10 +456,9 @@ gs_auth_store_load (GsAuth *auth, GsAuthStoreFlags flags,
/* metadata */
if (flags & GS_AUTH_STORE_FLAG_METADATA) {
- GList *l;
g_autoptr(GList) keys = NULL;
keys = g_hash_table_get_keys (auth->metadata);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
g_autofree gchar *tmp = NULL;
const gchar *key = l->data;
const gchar *value = g_hash_table_lookup (auth->metadata, key);
@@ -538,10 +537,9 @@ gs_auth_store_save (GsAuth *auth, GsAuthStoreFlags flags,
/* metadata */
if (flags & GS_AUTH_STORE_FLAG_METADATA) {
- GList *l;
g_autoptr(GList) keys = NULL;
keys = g_hash_table_get_keys (auth->metadata);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *key = l->data;
const gchar *value = g_hash_table_lookup (auth->metadata, key);
if (value == NULL)
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index dd08f9bc..bfbce076 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1899,7 +1899,6 @@ gs_plugin_loader_get_allow_updates (GsPluginLoader *plugin_loader)
{
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
g_autoptr(GList) list = NULL;
- GList *l;
/* nothing */
if (g_hash_table_size (priv->disallow_updates) == 0)
@@ -1907,7 +1906,7 @@ gs_plugin_loader_get_allow_updates (GsPluginLoader *plugin_loader)
/* list */
list = g_hash_table_get_values (priv->disallow_updates);
- for (l = list; l != NULL; l = l->next) {
+ for (GList *l = list; l != NULL; l = l->next) {
const gchar *reason = l->data;
g_debug ("managed updates inhibited by %s", reason);
}
@@ -1956,13 +1955,12 @@ gs_plugin_loader_get_events (GsPluginLoader *plugin_loader)
{
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
GPtrArray *events = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
- GList *l;
g_autoptr(GList) keys = NULL;
g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&priv->events_by_id_mutex);
/* just add everything */
keys = g_hash_table_get_keys (priv->events_by_id);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *key = l->data;
GsPluginEvent *event = g_hash_table_lookup (priv->events_by_id, key);
if (event == NULL) {
@@ -1987,13 +1985,12 @@ GsPluginEvent *
gs_plugin_loader_get_event_default (GsPluginLoader *plugin_loader)
{
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
- GList *l;
g_autoptr(GList) keys = NULL;
g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&priv->events_by_id_mutex);
/* just add everything */
keys = g_hash_table_get_keys (priv->events_by_id);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *key = l->data;
GsPluginEvent *event = g_hash_table_lookup (priv->events_by_id, key);
if (event == NULL) {
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 62c1ad6c..25b05e3d 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -304,12 +304,11 @@ static void
gs_appstream_copy_metadata (GsApp *app, AsApp *item)
{
GHashTable *hash;
- GList *l;
g_autoptr(GList) keys = NULL;
hash = as_app_get_metadata (item);
keys = g_hash_table_get_keys (hash);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *key = l->data;
const gchar *value = g_hash_table_lookup (hash, key);
if (gs_app_get_metadata_item (app, key) != NULL)
@@ -619,10 +618,9 @@ gs_appstream_refine_app (GsPlugin *plugin,
urls = as_app_get_urls (item);
if (g_hash_table_size (urls) > 0 &&
gs_app_get_url (app, AS_URL_KIND_HOMEPAGE) == NULL) {
- GList *l;
g_autoptr(GList) keys = NULL;
keys = g_hash_table_get_keys (urls);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
gs_app_set_url (app,
as_url_kind_from_string (l->data),
g_hash_table_lookup (urls, l->data));
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index bdf70ba8..9ca09111 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -71,7 +71,6 @@ gs_plugin_detect_reload_apps (GsPlugin *plugin)
GsPluginData *priv = gs_plugin_get_data (plugin);
AsApp *item;
GsApp *app;
- GList *l;
guint cnt = 0;
g_autoptr(GHashTable) app_hash = NULL;
g_autoptr(GList) keys = NULL;
@@ -80,7 +79,7 @@ gs_plugin_detect_reload_apps (GsPlugin *plugin)
/* find packages that have been added */
app_hash = gs_plugin_appstream_create_app_hash (priv->store);
keys = g_hash_table_get_keys (app_hash);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *key = l->data;
item = g_hash_table_lookup (priv->app_hash_old, key);
if (item == NULL) {
@@ -95,7 +94,7 @@ gs_plugin_detect_reload_apps (GsPlugin *plugin)
/* find packages that have been removed */
keys_old = g_hash_table_get_keys (priv->app_hash_old);
- for (l = keys_old; l != NULL; l = l->next) {
+ for (GList *l = keys_old; l != NULL; l = l->next) {
const gchar *key = l->data;
item = g_hash_table_lookup (app_hash, key);
if (item == NULL) {
@@ -207,7 +206,6 @@ gs_plugin_appstream_get_origins_hash (GPtrArray *array)
{
AsApp *app;
GHashTable *origins = NULL;
- GList *l;
const gchar *tmp;
gdouble perc;
guint *cnt;
@@ -232,7 +230,7 @@ gs_plugin_appstream_get_origins_hash (GPtrArray *array)
/* convert the cnt to a percentage */
keys = g_hash_table_get_keys (origins);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
tmp = l->data;
if (tmp == NULL || tmp[0] == '\0')
continue;
diff --git a/plugins/core/gs-plugin-key-colors.c b/plugins/core/gs-plugin-key-colors.c
index 65f31ea8..201ebebe 100644
--- a/plugins/core/gs-plugin-key-colors.c
+++ b/plugins/core/gs-plugin-key-colors.c
@@ -71,7 +71,6 @@ _convert_from_rgb8 (guchar val)
static void
gs_plugin_key_colors_set_for_pixbuf (GsApp *app, GdkPixbuf *pb, guint number)
{
- GList *l;
gint rowstride, n_channels;
gint x, y;
guchar *pixels, *p;
@@ -132,7 +131,7 @@ gs_plugin_key_colors_set_for_pixbuf (GsApp *app, GdkPixbuf *pb, guint number)
/* order by most popular */
values = g_hash_table_get_values (hash);
values = g_list_sort (values, gs_color_bin_sort_cb);
- for (l = values; l != NULL; l = l->next) {
+ for (GList *l = values; l != NULL; l = l->next) {
GsColorBin *s = l->data;
g_autofree GdkRGBA *color = g_new0 (GdkRGBA, 1);
color->red = s->color.red / s->cnt;
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index d9a96d8b..c5373da4 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -220,12 +220,11 @@ static void
gs_flatpak_remove_prefixed_names (AsApp *app)
{
GHashTable *names;
- GList *l;
g_autoptr(GList) keys = NULL;
names = as_app_get_names (app);
keys = g_hash_table_get_keys (names);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *locale = l->data;
const gchar *value = g_hash_table_lookup (names, locale);
if (value == NULL)
diff --git a/plugins/limba/gs-plugin-limba.c b/plugins/limba/gs-plugin-limba.c
index d5ed688b..3b58b0ee 100644
--- a/plugins/limba/gs-plugin-limba.c
+++ b/plugins/limba/gs-plugin-limba.c
@@ -359,7 +359,6 @@ gs_plugin_add_updates (GsPlugin *plugin,
{
GsPluginData *priv = gs_plugin_get_data (plugin);
g_autoptr(GList) updates = NULL;
- GList *l;
g_autoptr(GError) error_local = NULL;
updates = li_manager_get_update_list (priv->mgr, &error_local);
@@ -372,7 +371,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
return FALSE;
}
- for (l = updates; l != NULL; l = l->next) {
+ for (GList *l = updates; l != NULL; l = l->next) {
LiPkgInfo *old_pki;
LiPkgInfo *new_pki;
g_autoptr(GsApp) app = NULL;
diff --git a/plugins/modalias/gs-plugin-modalias.c b/plugins/modalias/gs-plugin-modalias.c
index b964b507..b630a34d 100644
--- a/plugins/modalias/gs-plugin-modalias.c
+++ b/plugins/modalias/gs-plugin-modalias.c
@@ -71,7 +71,6 @@ static void
gs_plugin_modalias_ensure_devices (GsPlugin *plugin)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- GList *l;
g_autoptr(GList) list = NULL;
g_autoptr(AsProfileTask) ptask = NULL;
@@ -86,7 +85,7 @@ gs_plugin_modalias_ensure_devices (GsPlugin *plugin)
/* get the devices, and assume ownership of each */
list = g_udev_client_query_by_subsystem (priv->client, NULL);
- for (l = list; l != NULL; l = l->next) {
+ for (GList *l = list; l != NULL; l = l->next) {
GUdevDevice *device = G_UDEV_DEVICE (l->data);
if (g_udev_device_get_sysfs_attr (device, "modalias") == NULL) {
g_object_unref (device);
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index 887405ea..e6b4f0d7 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -121,7 +121,6 @@ static gboolean
gs_plugin_odrs_load_ratings (GsPlugin *plugin, const gchar *fn, GError **error)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- GList *l;
JsonNode *json_root;
JsonObject *json_item;
g_autoptr(GList) apps = NULL;
@@ -155,7 +154,7 @@ gs_plugin_odrs_load_ratings (GsPlugin *plugin, const gchar *fn, GError **error)
/* parse each app */
json_item = json_node_get_object (json_root);
apps = json_object_get_members (json_item);
- for (l = apps; l != NULL; l = l->next) {
+ for (GList *l = apps; l != NULL; l = l->next) {
const gchar *app_id = (const gchar *) l->data;
JsonObject *json_app = json_object_get_object_member (json_item, app_id);
g_autoptr(GArray) ratings = NULL;;
diff --git a/plugins/steam/gs-plugin-steam.c b/plugins/steam/gs-plugin-steam.c
index f4cb2241..34f2ef8e 100644
--- a/plugins/steam/gs-plugin-steam.c
+++ b/plugins/steam/gs-plugin-steam.c
@@ -226,10 +226,9 @@ gs_plugin_steam_dump_apps (GPtrArray *apps)
for (i = 0; i < apps->len; i++) {
g_autoptr(GList) keys = NULL;
- GList *l;
app = g_ptr_array_index (apps, i);
keys = g_hash_table_get_keys (app);
- for (l = keys; l != NULL; l = l->next) {
+ for (GList *l = keys; l != NULL; l = l->next) {
const gchar *tmp;
GVariant *value;
tmp = l->data;
diff --git a/src/gs-app-folder-dialog.c b/src/gs-app-folder-dialog.c
index bef8dd07..8ccdd3a0 100644
--- a/src/gs-app-folder-dialog.c
+++ b/src/gs-app-folder-dialog.c
@@ -62,14 +62,13 @@ static void
apply_changes (GsAppFolderDialog *dialog)
{
const gchar *folder;
- GList *l;
if (dialog->selected_row)
folder = (const gchar *)g_object_get_data (G_OBJECT (dialog->selected_row), "folder");
else
folder = NULL;
- for (l = dialog->apps; l; l = l->next) {
+ for (GList *l = dialog->apps; l; l = l->next) {
GsApp *app = l->data;
gs_folders_set_app_folder (dialog->folders,
gs_app_get_id (app),
diff --git a/src/gs-application.c b/src/gs-application.c
index 386f467d..b3e30ed2 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -106,10 +106,9 @@ gboolean
gs_application_has_active_window (GsApplication *application)
{
GList *windows;
- GList *l;
windows = gtk_application_get_windows (GTK_APPLICATION (application));
- for (l = windows; l != NULL; l = l->next) {
+ for (GList *l = windows; l != NULL; l = l->next) {
if (gtk_window_is_active (GTK_WINDOW (l->data)))
return TRUE;
}
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index d1ebeb9c..4c59a06f 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1879,12 +1879,11 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
static void
gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
{
- GList *l;
g_autoptr(GList) addons = NULL;
/* Mark ticked addons to be installed together with the app */
addons = gtk_container_get_children (GTK_CONTAINER (self->list_box_addons));
- for (l = addons; l; l = l->next) {
+ for (GList *l = addons; l; l = l->next) {
if (gs_app_addon_row_get_selected (l->data)) {
GsApp *addon = gs_app_addon_row_get_addon (l->data);
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 30aa9de5..32c8bc5b 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -278,12 +278,11 @@ static void
gs_extras_page_add_app (GsExtrasPage *self, GsApp *app, GsAppList *list, SearchData *search_data)
{
GtkWidget *app_row;
- GList *l;
g_autoptr(GList) existing_apps = NULL;
/* Don't add same app twice */
existing_apps = gtk_container_get_children (GTK_CONTAINER (self->list_box_results));
- for (l = existing_apps; l != NULL; l = l->next) {
+ for (GList *l = existing_apps; l != NULL; l = l->next) {
GsApp *existing_app;
existing_app = gs_app_row_get_app (GS_APP_ROW (l->data));
@@ -439,7 +438,6 @@ create_missing_app (SearchData *search_data)
static gchar *
build_no_results_label (GsExtrasPage *self)
{
- GList *l;
GsApp *app = NULL;
guint num;
g_autofree gchar *codec_titles = NULL;
@@ -453,7 +451,7 @@ build_no_results_label (GsExtrasPage *self)
g_assert (num > 0);
array = g_ptr_array_new ();
- for (l = list; l != NULL; l = l->next) {
+ for (GList *l = list; l != NULL; l = l->next) {
app = gs_app_row_get_app (GS_APP_ROW (l->data));
g_ptr_array_add (array,
g_object_get_data (G_OBJECT (l->data), "missing-title"));
@@ -478,7 +476,6 @@ static void
show_search_results (GsExtrasPage *self)
{
GsApp *app;
- GList *l;
guint n_children;
guint n_missing;
g_autoptr(GList) list = NULL;
@@ -488,7 +485,7 @@ show_search_results (GsExtrasPage *self)
/* count the number of rows with missing codecs */
n_missing = 0;
- for (l = list; l != NULL; l = l->next) {
+ for (GList *l = list; l != NULL; l = l->next) {
app = gs_app_row_get_app (GS_APP_ROW (l->data));
if (g_strcmp0 (gs_app_get_id (app), "missing-codec") == 0) {
n_missing++;
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 814b7074..55663975 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -112,11 +112,10 @@ static void
gs_installed_page_app_removed (GsPage *page, GsApp *app)
{
GsInstalledPage *self = GS_INSTALLED_PAGE (page);
- GList *l;
g_autoptr(GList) children = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
if (gs_app_row_get_app (app_row) == app) {
gs_installed_page_unreveal_row (app_row);
@@ -534,12 +533,11 @@ static gboolean
gs_installed_page_has_app (GsInstalledPage *self,
GsApp *app)
{
- GList *l;
gboolean ret = FALSE;
g_autoptr(GList) children = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
if (gs_app_row_get_app (app_row) == app) {
ret = TRUE;
@@ -593,7 +591,6 @@ gs_installed_page_pending_apps_changed_cb (GsPluginLoader *plugin_loader,
static void
set_selection_mode (GsInstalledPage *self, gboolean selection_mode)
{
- GList *l;
GtkWidget *header;
GtkWidget *widget;
GtkStyleContext *context;
@@ -632,7 +629,7 @@ set_selection_mode (GsInstalledPage *self, gboolean selection_mode)
}
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
GsApp *app = gs_app_row_get_app (app_row);
gs_app_row_set_selectable (app_row,
@@ -654,12 +651,12 @@ selection_mode_cb (GtkButton *button, GsInstalledPage *self)
static GList *
get_selected_apps (GsInstalledPage *self)
{
- GList *l, *list;
+ GList *list;
g_autoptr(GList) children = NULL;
list = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
if (gs_app_row_get_selected (app_row)) {
list = g_list_prepend (list, gs_app_row_get_app (app_row));
@@ -671,7 +668,6 @@ get_selected_apps (GsInstalledPage *self)
static void
selection_changed (GsInstalledPage *self)
{
- GList *l;
GsApp *app;
gboolean has_folders, has_nonfolders;
g_autoptr(GList) apps = NULL;
@@ -680,7 +676,7 @@ selection_changed (GsInstalledPage *self)
folders = gs_folders_get ();
has_folders = has_nonfolders = FALSE;
apps = get_selected_apps (self);
- for (l = apps; l; l = l->next) {
+ for (GList *l = apps; l; l = l->next) {
app = l->data;
if (gs_folders_get_app_folder (folders,
gs_app_get_id (app),
@@ -723,14 +719,13 @@ show_folder_dialog (GtkButton *button, GsInstalledPage *self)
static void
remove_folders (GtkButton *button, GsInstalledPage *self)
{
- GList *l;
GsApp *app;
g_autoptr(GList) apps = NULL;
g_autoptr(GsFolders) folders = NULL;
folders = gs_folders_get ();
apps = get_selected_apps (self);
- for (l = apps; l; l = l->next) {
+ for (GList *l = apps; l; l = l->next) {
app = l->data;
gs_folders_set_app_folder (folders,
gs_app_get_id (app),
@@ -746,11 +741,10 @@ remove_folders (GtkButton *button, GsInstalledPage *self)
static void
select_all_cb (GtkMenuItem *item, GsInstalledPage *self)
{
- GList *l;
g_autoptr(GList) children = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
gs_app_row_set_selected (app_row, TRUE);
}
@@ -759,11 +753,10 @@ select_all_cb (GtkMenuItem *item, GsInstalledPage *self)
static void
select_none_cb (GtkMenuItem *item, GsInstalledPage *self)
{
- GList *l;
g_autoptr(GList) children = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->list_box_install));
- for (l = children; l; l = l->next) {
+ for (GList *l = children; l; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
gs_app_row_set_selected (app_row, FALSE);
}
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 32ae9aab..bb3f8726 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -176,7 +176,6 @@ _get_app_section (GsApp *app)
static GsAppList *
_get_apps_for_section (GsUpdatesPage *self, GsUpdatePageSection section)
{
- GList *l;
GsAppList *apps;
GtkContainer *container;
g_autoptr(GList) children = NULL;
@@ -186,7 +185,7 @@ _get_apps_for_section (GsUpdatesPage *self, GsUpdatePageSection section)
return apps;
container = GTK_CONTAINER (self->listboxes[section]);
children = gtk_container_get_children (container);
- for (l = children; l != NULL; l = l->next) {
+ for (GList *l = children; l != NULL; l = l->next) {
GsAppRow *app_row = GS_APP_ROW (l->data);
GsApp *app = gs_app_row_get_app (app_row);
if (_get_app_section (app) != section)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]