]> git.kaiwu.me - nginx.git/commit
Use NULL instead of 0 for null pointer constant.
authorAndrew Clayton <a.clayton@nginx.com>
Wed, 21 May 2025 21:30:20 +0000 (22:30 +0100)
committerSergey Kandaurov <s.kandaurov@f5.com>
Tue, 23 Dec 2025 18:40:33 +0000 (22:40 +0400)
commita39be5d9d296b72091f3181eea58303ac8d0828f
tree674e862fcef17c1e15a6616381e41b4d5d749a14
parent36744831036cc4f68b32f02d1cd1bd33352bd298
Use NULL instead of 0 for null pointer constant.

There were a few random places where 0 was being used as a null pointer
constant.

We have a NULL macro for this very purpose, use it.

There is also some interest in actually deprecating the use of 0 as a
null pointer constant in C.

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/core/ngx_thread_pool.c
src/event/ngx_event_openssl_cache.c
src/event/quic/ngx_event_quic.c
src/http/modules/ngx_http_gunzip_filter_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/os/unix/ngx_time.c