From 948624aba73b696aa5dcb826231784a97b966b00 Mon Sep 17 00:00:00 2001 From: hakril Date: Mon, 30 Dec 2024 07:39:52 -0800 Subject: [PATCH] Fix more formatting --- src/core/nginx.c | 11 +++++------ src/os/win32/ngx_service.c | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/nginx.c b/src/core/nginx.c index 09ae42134..11e5994f5 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -980,18 +980,17 @@ ngx_get_options(int argc, char *const *argv) ngx_log_stderr(0, "invalid option: \"-s %s\"", ngx_signal); return NGX_ERROR; - #ifdef NGX_WIN32 +#ifdef NGX_WIN32 case 'i': - // TODO: remove this option if not a Windows build ? ngx_install_windows_service(); exit(0); // Do something else ? case 'w': // Run as windows service - ngx_service = 1; // Error if other options (like -s) is provided ? + ngx_service = 1; goto next; - #endif +#endif default: ngx_log_stderr(0, "invalid option: \"%c\"", *(p - 1)); @@ -1150,11 +1149,11 @@ ngx_process_options(ngx_cycle_t *cycle) cycle->log->log_level = NGX_LOG_INFO; } - #if NGX_WIN32 +#if NGX_WIN32 if (ngx_service) { cycle->service = 1; } - #endif +#endif return NGX_OK; } diff --git a/src/os/win32/ngx_service.c b/src/os/win32/ngx_service.c index 0755de150..dbb947275 100644 --- a/src/os/win32/ngx_service.c +++ b/src/os/win32/ngx_service.c @@ -153,5 +153,5 @@ service_handler(DWORD control, DWORD type, void *data, void *ctx) default: return ERROR_CALL_NOT_IMPLEMENTED; } - return 0; + return NO_ERROR; }