summaryrefslogtreecommitdiff
path: root/src/nautilus-mime-actions.c
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-02-27 22:03:33 +0200
committerCarlos Soriano <csoriano1618@gmail.com>2018-03-01 08:37:50 +0000
commit6286e0a07959f171a4bc8d6c4e3dabd52d8ad8ee (patch)
tree0b91426fa70efeeb90b679f8e8f1d75d74752983 /src/nautilus-mime-actions.c
parent72df1bb3bbefc48c77b0f532cbf3f5db386c7237 (diff)
downloadnautilus-6286e0a07959f171a4bc8d6c4e3dabd52d8ad8ee.tar.gz
general: don’t shadow variables
Shadowing variables is error-prone, since one might mean to refer to a variable that was declared earlier, but has the same name. Additionally, being more strict about variable scoping can help make the code more readable.
Diffstat (limited to 'src/nautilus-mime-actions.c')
-rw-r--r--src/nautilus-mime-actions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 2f3f9b196..043cb2ae6 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1607,7 +1607,6 @@ activate_files (ActivateParameters *parameters)
g_autoptr (GQueue) open_in_view_files = NULL;
GList *l;
ActivationAction action;
- LaunchLocation *location;
launch_desktop_files = g_queue_new ();
launch_files = g_queue_new ();
@@ -1617,6 +1616,8 @@ activate_files (ActivateParameters *parameters)
for (l = parameters->locations; l != NULL; l = l->next)
{
+ LaunchLocation *location;
+
location = l->data;
file = location->file;