diff options
-rw-r--r-- | misc/win32/start.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/misc/win32/start.c b/misc/win32/start.c index b0ae15aa4..e15bf5d83 100644 --- a/misc/win32/start.c +++ b/misc/win32/start.c @@ -33,10 +33,10 @@ int APR_DECLARE_DATA apr_app_init_complete = 0; * * An internal apr function to convert a double-null terminated set * of single-null terminated strings from wide Unicode to narrow utf-8 - * as a list of strings. These are allocated from the MSVCRT's + * as a list of strings. These are allocated from the MSVCRT's * _CRT_BLOCK to trick the system into trusting our store. */ -static int warrsztoastr(const char * const * *retarr, +static int warrsztoastr(const char * const * *retarr, const wchar_t * arrsz, int args) { const apr_wchar_t *wch; @@ -48,7 +48,7 @@ static int warrsztoastr(const char * const * *retarr, if (args < 0) { for (args = 1, wch = arrsz; wch[0] || wch[1]; ++wch) - if (!*wch) + if (!*wch) ++args; } wsize = 1 + wch - arrsz; @@ -90,8 +90,8 @@ static int warrsztoastr(const char * const * *retarr, /* Reprocess the arguments to main() for a completely apr-ized application */ -APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, - const char * const * *argv, +APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, + const char * const * *argv, const char * const * *env) { apr_status_t rv = apr_initialize(); @@ -126,7 +126,7 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, sysstr = GetEnvironmentStringsW(); dupenv = warrsztoastr(&_environ, sysstr, -1); - if (env) { + if (env) { *env = apr_malloc_dbg((dupenv + 1) * sizeof (char *), __FILE__, __LINE__ ); memcpy((void*)*env, _environ, (dupenv + 1) * sizeof (char *)); @@ -176,11 +176,11 @@ APR_DECLARE(apr_status_t) apr_initialize(void) if (apr_get_oslevel(&osver) != APR_SUCCESS) { return APR_EEXIST; } - + tls_apr_thread = TlsAlloc(); if ((status = apr_pool_initialize()) != APR_SUCCESS) return status; - + if (apr_pool_create(&pool, NULL) != APR_SUCCESS) { return APR_ENOPOOL; } @@ -197,7 +197,7 @@ APR_DECLARE(apr_status_t) apr_initialize(void) WSACleanup(); return APR_EEXIST; } - + apr_signal_init(pool); return APR_SUCCESS; @@ -210,7 +210,7 @@ APR_DECLARE_NONSTD(void) apr_terminate(void) return; } apr_pool_terminate(); - + WSACleanup(); TlsFree(tls_apr_thread); |