From fdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Thu, 2 May 2019 01:09:20 +0200 Subject: libcaja-private: reduce the scope of some variables --- libcaja-private/caja-file-dnd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libcaja-private/caja-file-dnd.c') diff --git a/libcaja-private/caja-file-dnd.c b/libcaja-private/caja-file-dnd.c index 061019e9..e5322486 100644 --- a/libcaja-private/caja-file-dnd.c +++ b/libcaja-private/caja-file-dnd.c @@ -35,10 +35,9 @@ static gboolean caja_drag_can_accept_files (CajaFile *drop_target_item) { - CajaDirectory *directory; - if (caja_file_is_directory (drop_target_item)) { + CajaDirectory *directory; gboolean res; /* target is a directory, accept if editable */ @@ -154,7 +153,7 @@ void caja_drag_file_receive_dropped_keyword (CajaFile *file, const char *keyword) { - GList *keywords, *word; + GList *keywords; g_return_if_fail (CAJA_IS_FILE (file)); g_return_if_fail (keyword != NULL); @@ -166,6 +165,8 @@ caja_drag_file_receive_dropped_keyword (CajaFile *file, } else { + GList *word; + keywords = caja_file_get_keywords (file); word = g_list_find_custom (keywords, keyword, (GCompareFunc) strcmp); if (word == NULL) -- cgit v1.2.1