diff options
author | Pablo Barciela <[email protected]> | 2019-05-02 01:09:20 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-06 13:53:37 +0200 |
commit | a110c542bd7a16625f03c97e2fefa3be8da50c85 (patch) | |
tree | 7af078f9084b33eb0d5df7f3657a1f8049ff6b83 /libcaja-private/caja-search-directory-file.c | |
parent | 476f56a25be636970b336d525a7766b6d1eb3fff (diff) | |
download | caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.bz2 caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.xz |
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-search-directory-file.c')
-rw-r--r-- | libcaja-private/caja-search-directory-file.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libcaja-private/caja-search-directory-file.c b/libcaja-private/caja-search-directory-file.c index 3ff83a7f..f455dc01 100644 --- a/libcaja-private/caja-search-directory-file.c +++ b/libcaja-private/caja-search-directory-file.c @@ -100,10 +100,10 @@ search_directory_file_get_item_count (CajaFile *file, guint *count, gboolean *count_unreadable) { - GList *file_list; - if (count) { + GList *file_list; + file_list = caja_directory_get_file_list (file->details->directory); *count = g_list_length (file_list); @@ -122,10 +122,10 @@ search_directory_file_get_deep_counts (CajaFile *file, goffset *total_size, goffset *total_size_on_disk) { - CajaFile *dir_file; GList *file_list, *l; guint dirs, files; GFileType type; + CajaFile *dir_file = NULL; file_list = caja_directory_get_file_list (file->details->directory); @@ -182,8 +182,6 @@ void caja_search_directory_file_update_display_name (CajaSearchDirectoryFile *search_file) { CajaFile *file; - CajaSearchDirectory *search_dir; - CajaQuery *query; char *display_name; gboolean changed; @@ -192,6 +190,9 @@ caja_search_directory_file_update_display_name (CajaSearchDirectoryFile *search_ file = CAJA_FILE (search_file); if (file->details->directory) { + CajaSearchDirectory *search_dir; + CajaQuery *query; + search_dir = CAJA_SEARCH_DIRECTORY (file->details->directory); query = caja_search_directory_get_query (search_dir); |