diff options
author | Colomban Wendling <[email protected]> | 2023-11-15 15:10:11 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2024-02-04 18:37:58 +0100 |
commit | 62fabfc793b545250dafaf37f75650cbfdce095f (patch) | |
tree | 813bd86b3926f24be1f17a1830f2f3d65fd4ec8a /libmate-panel-applet | |
parent | f98be9734446e1b620312b69dc8fa8ed0f0997d9 (diff) | |
download | mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.bz2 mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.xz |
Reduce scope of variables
Mostly found by cppcheck.
origin commit was:
https://github.com/mate-desktop/mate-panel/commit/96c7ebc
Diffstat (limited to 'libmate-panel-applet')
-rw-r--r-- | libmate-panel-applet/mate-panel-applet-gsettings.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-gsettings.c b/libmate-panel-applet/mate-panel-applet-gsettings.c index a4bd3db1..82867639 100644 --- a/libmate-panel-applet/mate-panel-applet-gsettings.c +++ b/libmate-panel-applet/mate-panel-applet-gsettings.c @@ -149,9 +149,9 @@ void mate_panel_applet_settings_set_glist (GSettings *settings, gchar *key, GList *list) { GArray *array; - GList *l; + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (l = list; l; l = l->next) { + for (GList *l = list; l; l = l->next) { array = g_array_append_val (array, l->data); } g_settings_set_strv (settings, key, (const gchar **) array->data); @@ -178,9 +178,9 @@ void mate_panel_applet_settings_set_gslist (GSettings *settings, gchar *key, GSList *list) { GArray *array; - GSList *l; + array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - for (l = list; l; l = l->next) { + for (GSList *l = list; l; l = l->next) { array = g_array_append_val (array, l->data); } g_settings_set_strv (settings, key, (const gchar **) array->data); |