]> git.kaiwu.me - nginx.git/commit
Use NGX_CONF_OK in some function return checks.
authorAndrew Clayton <a.clayton@nginx.com>
Wed, 21 May 2025 21:19:32 +0000 (22:19 +0100)
committerSergey Kandaurov <s.kandaurov@f5.com>
Tue, 23 Dec 2025 18:40:33 +0000 (22:40 +0400)
commit36744831036cc4f68b32f02d1cd1bd33352bd298
tree334b2b853efa42f8f8ceda3338cd2dd203fd20fe
parentaf8b6ac13e84371f598064b23f401e8764dde881
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>
src/http/modules/ngx_http_addition_filter_module.c
src/http/modules/ngx_http_charset_filter_module.c
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_gzip_filter_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_scgi_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/http/modules/ngx_http_sub_filter_module.c
src/http/modules/ngx_http_uwsgi_module.c
src/http/modules/ngx_http_xslt_filter_module.c
src/http/ngx_http_core_module.c