summaryrefslogtreecommitdiff
path: root/mate-panel/panel-lockdown.c
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2023-11-15 15:10:11 +0100
committerLuke from DC <[email protected]>2023-11-21 20:19:58 +0000
commit96c7ebc6dc9e8b8327db04a9570054ee78743353 (patch)
tree5d600712c7b3c035dbe78045641cdad9e358b91a /mate-panel/panel-lockdown.c
parent7632b4fe9bb81a440bdde64c8cc45b15e07b1de8 (diff)
downloadmate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.bz2
mate-panel-96c7ebc6dc9e8b8327db04a9570054ee78743353.tar.xz
Reduce scope of variables
Mostly found by cppcheck.
Diffstat (limited to 'mate-panel/panel-lockdown.c')
-rw-r--r--mate-panel/panel-lockdown.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mate-panel/panel-lockdown.c b/mate-panel/panel-lockdown.c
index 16648ee3..8750be81 100644
--- a/mate-panel/panel-lockdown.c
+++ b/mate-panel/panel-lockdown.c
@@ -269,12 +269,10 @@ panel_lockdown_get_disable_force_quit (void)
gboolean
panel_lockdown_is_applet_disabled (const char *iid)
{
- gint i;
-
g_assert (panel_lockdown.initialized != FALSE);
if (panel_lockdown.disabled_applets)
- for (i = 0; panel_lockdown.disabled_applets[i]; i++)
+ for (gint i = 0; panel_lockdown.disabled_applets[i]; i++)
if (!strcmp (panel_lockdown.disabled_applets[i], iid))
return TRUE;
@@ -286,9 +284,7 @@ panel_lockdown_notify_find (GSList *closures,
GCallback callback_func,
gpointer user_data)
{
- GSList *l;
-
- for (l = closures; l; l = l->next) {
+ for (GSList *l = closures; l; l = l->next) {
GCClosure *cclosure = l->data;
GClosure *closure = l->data;