diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2025-05-21 22:19:32 +0100 |
---|---|---|
committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2025-06-21 10:36:45 +0400 |
commit | c370ac8a51152cc67f803b553579bfc16299efc3 (patch) | |
tree | f39c533862d7dae0c5aaef6e2a0d74f791a34f0b /src/http/modules/ngx_http_proxy_module.c | |
parent | ba917b1360c6df3dda312325daccf714a3145718 (diff) | |
download | nginx-c370ac8a51152cc67f803b553579bfc16299efc3.tar.gz nginx-c370ac8a51152cc67f803b553579bfc16299efc3.zip |
Use NGX_CONF_OK in some function return checks.
The functions ngx_http_merge_types() & ngx_conf_merge_path_value()
return either NGX_CONF_OK aka NULL aka ((void *)0) (probably) or
NGX_CONF_ERROR aka ((void *)-1).
They don't return an integer constant which is what NGX_OK aka (0) is.
Lets use the right thing in the function return check.
This was found with -Wzero-as-null-pointer-constant which was enabled
for C in GCC 15 (not enabled with Wall or Wextra... yet).
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117059>
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index dbe998b13..ff7460e44 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -3859,7 +3859,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) if (ngx_conf_merge_path_value(cf, &conf->upstream.temp_path, prev->upstream.temp_path, &ngx_http_proxy_temp_path) - != NGX_OK) + != NGX_CONF_OK) { return NGX_CONF_ERROR; } |