summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2025-05-21 22:30:20 +0100
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>2025-06-21 10:36:45 +0400
commit4eaecc5e8aa7bbaf9e58bf56560a8b1e67d0a8b7 (patch)
tree9f2a7e24461e1a32f1a78fe066544f1c78fb1109 /src/http/modules
parentc370ac8a51152cc67f803b553579bfc16299efc3 (diff)
downloadnginx-4eaecc5e8aa7bbaf9e58bf56560a8b1e67d0a8b7.tar.gz
nginx-4eaecc5e8aa7bbaf9e58bf56560a8b1e67d0a8b7.tar.bz2
Use NULL instead of 0 for null pointer constant.HEADmaster
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>
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_gunzip_filter_module.c2
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_gunzip_filter_module.c b/src/http/modules/ngx_http_gunzip_filter_module.c
index 5d170a1ba..22e75e300 100644
--- a/src/http/modules/ngx_http_gunzip_filter_module.c
+++ b/src/http/modules/ngx_http_gunzip_filter_module.c
@@ -304,7 +304,7 @@ ngx_http_gunzip_filter_inflate_start(ngx_http_request_t *r,
{
int rc;
- ctx->zstream.next_in = Z_NULL;
+ ctx->zstream.next_in = NULL;
ctx->zstream.avail_in = 0;
ctx->zstream.zalloc = ngx_http_gunzip_filter_alloc;
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index c862be05a..65ca03440 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -820,7 +820,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
}
for (prm = cmd->params; prm->name.len; prm++) {
- if (prm->mandatory && params[prm->index] == 0) {
+ if (prm->mandatory && params[prm->index] == NULL) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"mandatory \"%V\" parameter is absent "
"in \"%V\" SSI command",