talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 217451accf3ec774a3fefd59b9cec38b5803db26
parent c69dcb6b3ccb4fe9af6d5ed729936a8f17c34d22
Author: wwp <wwp@free.fr>
Date:   Mon, 11 Jun 2018 19:12:20 +0200

Reduce scope of few variables.

Diffstat:
Msrc/plugins/archive/libarchive_archive.c | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/plugins/archive/libarchive_archive.c b/src/plugins/archive/libarchive_archive.c @@ -441,13 +441,6 @@ const gchar* archive_extract(const char* archive_name, int flags) { const gchar* archive_create(const char* archive_name, GSList* files, COMPRESS_METHOD method, ARCHIVE_FORMAT format) { struct archive* arch; - struct archive_entry* entry; - char* buf = NULL; - ssize_t len; - int fd; - struct file_info* file; - gchar* filename = NULL; - gchar* msg = NULL; #ifndef _TEST gint num = 0; @@ -564,6 +557,9 @@ const gchar* archive_create(const char* archive_name, GSList* files, return archive_error_string(arch); while (files && ! stop_action) { + struct file_info* file; + gchar* filename = NULL; + #ifndef _TEST set_progress_print_all(num++, total, 30); #endif @@ -579,8 +575,13 @@ const gchar* archive_create(const char* archive_name, GSList* files, #endif } else { + struct archive_entry* entry; + char* buf = NULL; + ssize_t len; GError* err = NULL; GStatBuf st; + int fd; + gchar* msg = NULL; #ifndef _TEST debug_print("Adding: %s\n", filename);