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 /mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c | |
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 'mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c')
-rw-r--r-- | mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c index 115919b0..b65fe4a7 100644 --- a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c +++ b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c @@ -159,7 +159,6 @@ mate_panel_applets_manager_get_applet_factory_info_from_file (const gchar *filen { MatePanelAppletFactoryInfo *info; GKeyFile *applet_file; - const char *lib_prefix; gchar **groups; gsize n_groups; gsize i; @@ -189,6 +188,8 @@ mate_panel_applets_manager_get_applet_factory_info_from_file (const gchar *filen info->in_process = g_key_file_get_boolean (applet_file, MATE_PANEL_APPLET_FACTORY_GROUP, "InProcess", NULL); if (info->in_process) { + const char *lib_prefix; + info->location = g_key_file_get_string (applet_file, MATE_PANEL_APPLET_FACTORY_GROUP, "Location", NULL); if (!info->location) { @@ -335,15 +336,15 @@ applets_directory_changed (GFileMonitor *monitor, static void mate_panel_applets_manager_dbus_load_applet_infos (MatePanelAppletsManagerDBus *manager) { - GSList *dirs, *d; - GDir *dir; - const gchar *dirent; - GError *error = NULL; + GSList *dirs; dirs = mate_panel_applets_manager_get_applets_dirs (); - for (d = dirs; d; d = g_slist_next (d)) { + for (GSList *d = dirs; d; d = g_slist_next (d)) { + GDir *dir; + const gchar *dirent; GFileMonitor *monitor; GFile *dir_file; + GError *error = NULL; gchar *path = (gchar *) d->data; dir = g_dir_open (path, 0, &error); |