diff --git a/src/nxt_buf.h b/src/nxt_buf.h index a561ef4e1..2f2cbaa68 100644 --- a/src/nxt_buf.h +++ b/src/nxt_buf.h @@ -189,7 +189,7 @@ struct nxt_buf_s { #define nxt_buf_mem_set_size(bm, size) \ do { \ - (bm)->start = 0; \ + (bm)->start = NULL; \ (bm)->end = (void *) size; \ } while (0) diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 2f399678e..7d523beb8 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -716,7 +716,7 @@ nxt_unit_ctx_init(nxt_unit_impl_t *lib, nxt_unit_ctx_impl_t *ctx_impl, ctx_impl->req.req.unit = &lib->unit; ctx_impl->read_port = NULL; - ctx_impl->requests.slot = 0; + ctx_impl->requests.slot = NULL; return NXT_UNIT_OK; } diff --git a/src/python/nxt_python_asgi_http.c b/src/python/nxt_python_asgi_http.c index fc489bc12..27b3e0e03 100644 --- a/src/python/nxt_python_asgi_http.c +++ b/src/python/nxt_python_asgi_http.c @@ -45,10 +45,10 @@ static PyObject *nxt_py_asgi_http_done(PyObject *self, PyObject *future); static PyMethodDef nxt_py_asgi_http_methods[] = { - { "receive", nxt_py_asgi_http_receive, METH_NOARGS, 0 }, - { "send", nxt_py_asgi_http_send, METH_O, 0 }, - { "_done", nxt_py_asgi_http_done, METH_O, 0 }, - { NULL, NULL, 0, 0 } + { "receive", nxt_py_asgi_http_receive, METH_NOARGS, NULL }, + { "send", nxt_py_asgi_http_send, METH_O, NULL }, + { "_done", nxt_py_asgi_http_done, METH_O, NULL }, + {} }; static PyAsyncMethods nxt_py_asgi_async_methods = { diff --git a/src/python/nxt_python_asgi_lifespan.c b/src/python/nxt_python_asgi_lifespan.c index 041cca212..8ef783779 100644 --- a/src/python/nxt_python_asgi_lifespan.c +++ b/src/python/nxt_python_asgi_lifespan.c @@ -48,10 +48,10 @@ static void nxt_py_asgi_lifespan_dealloc(PyObject *self); static PyMethodDef nxt_py_asgi_lifespan_methods[] = { - { "receive", nxt_py_asgi_lifespan_receive, METH_NOARGS, 0 }, - { "send", nxt_py_asgi_lifespan_send, METH_O, 0 }, - { "_done", nxt_py_asgi_lifespan_done, METH_O, 0 }, - { NULL, NULL, 0, 0 } + { "receive", nxt_py_asgi_lifespan_receive, METH_NOARGS, NULL }, + { "send", nxt_py_asgi_lifespan_send, METH_O, NULL }, + { "_done", nxt_py_asgi_lifespan_done, METH_O, NULL }, + {} }; static PyMemberDef nxt_py_asgi_lifespan_members[] = { diff --git a/src/python/nxt_python_asgi_websocket.c b/src/python/nxt_python_asgi_websocket.c index ab1d0324e..e3c37e74e 100644 --- a/src/python/nxt_python_asgi_websocket.c +++ b/src/python/nxt_python_asgi_websocket.c @@ -70,10 +70,10 @@ static PyObject *nxt_py_asgi_websocket_done(PyObject *self, PyObject *future); static PyMethodDef nxt_py_asgi_websocket_methods[] = { - { "receive", nxt_py_asgi_websocket_receive, METH_NOARGS, 0 }, - { "send", nxt_py_asgi_websocket_send, METH_O, 0 }, - { "_done", nxt_py_asgi_websocket_done, METH_O, 0 }, - { NULL, NULL, 0, 0 } + { "receive", nxt_py_asgi_websocket_receive, METH_NOARGS, NULL }, + { "send", nxt_py_asgi_websocket_send, METH_O, NULL }, + { "_done", nxt_py_asgi_websocket_done, METH_O, NULL }, + {} }; static PyAsyncMethods nxt_py_asgi_async_methods = { diff --git a/src/python/nxt_python_wsgi.c b/src/python/nxt_python_wsgi.c index c621097ea..ec9fefcab 100644 --- a/src/python/nxt_python_wsgi.c +++ b/src/python/nxt_python_wsgi.c @@ -108,10 +108,10 @@ static PyMethodDef nxt_py_write_method[] = { static PyMethodDef nxt_py_input_methods[] = { - { "read", (PyCFunction) nxt_py_input_read, METH_VARARGS, 0 }, - { "readline", (PyCFunction) nxt_py_input_readline, METH_VARARGS, 0 }, - { "readlines", (PyCFunction) nxt_py_input_readlines, METH_VARARGS, 0 }, - { NULL, NULL, 0, 0 } + { "read", (PyCFunction) nxt_py_input_read, METH_VARARGS, NULL }, + { "readline", (PyCFunction) nxt_py_input_readline, METH_VARARGS, NULL }, + { "readlines", (PyCFunction) nxt_py_input_readlines, METH_VARARGS, NULL }, + {} }; diff --git a/src/ruby/nxt_ruby.c b/src/ruby/nxt_ruby.c index 27b868fed..717816df8 100644 --- a/src/ruby/nxt_ruby.c +++ b/src/ruby/nxt_ruby.c @@ -1081,7 +1081,7 @@ nxt_ruby_rack_result_body(nxt_unit_request_info_t *req, VALUE result) } } else if (rb_respond_to(body, rb_intern("each"))) { - rb_block_call(body, rb_intern("each"), 0, 0, + rb_block_call(body, rb_intern("each"), 0, NULL, nxt_ruby_rack_result_body_each, (VALUE) (uintptr_t) req); } else {