Move variable definitions to the start of their respective blocks.
Improves support for older compilers.
From Boaz Stolk <bstolk@aweta.nl>.
diff --git a/lib/zip_source_win32handle.c b/lib/zip_source_win32handle.c
index 7e30dfc..20b2521 100644
--- a/lib/zip_source_win32handle.c
+++ b/lib/zip_source_win32handle.c
@@ -408,6 +408,7 @@
static int
_win32_create_temp_file(_zip_source_win32_read_file_t *ctx)
{
+ zip_uint32_t value;
/*
Windows has GetTempFileName(), but it closes the file after
creation, leaving it open to a horrible race condition. So
@@ -447,7 +448,7 @@
}
}
- zip_uint32_t value = GetTickCount();
+ value = GetTickCount();
for (i = 0; i < 1024 && th == INVALID_HANDLE_VALUE; i++) {
th = ctx->ops->op_create_temp(ctx, &temp, value + i, psa);
if (th == INVALID_HANDLE_VALUE && GetLastError() != ERROR_FILE_EXISTS)