[nginx] Do not use the obsolete NGX_SOCKADDRLEN macro.
Ruslan Ermilov
ru at nginx.com
Fri Sep 22 10:11:48 UTC 2017
details: http://hg.nginx.org/nginx/rev/3b1b81e248bc
branches:
changeset: 7110:3b1b81e248bc
user: Ruslan Ermilov <ru at nginx.com>
date: Fri Sep 22 13:10:49 2017 +0300
description:
Do not use the obsolete NGX_SOCKADDRLEN macro.
The change in ac120e797d28 re-used the macro which was made obsolete
in adf25b8d0431.
diffstat:
src/http/modules/ngx_http_upstream_zone_module.c | 2 +-
src/stream/ngx_stream_upstream_zone_module.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r 4a670c18e5e6 -r 3b1b81e248bc src/http/modules/ngx_http_upstream_zone_module.c
--- a/src/http/modules/ngx_http_upstream_zone_module.c Mon Sep 18 11:09:41 2017 +0300
+++ b/src/http/modules/ngx_http_upstream_zone_module.c Fri Sep 22 13:10:49 2017 +0300
@@ -281,7 +281,7 @@ ngx_http_upstream_zone_copy_peer(ngx_htt
dst->server.data = NULL;
}
- dst->sockaddr = ngx_slab_calloc_locked(pool, NGX_SOCKADDRLEN);
+ dst->sockaddr = ngx_slab_calloc_locked(pool, sizeof(ngx_sockaddr_t));
if (dst->sockaddr == NULL) {
goto failed;
}
diff -r 4a670c18e5e6 -r 3b1b81e248bc src/stream/ngx_stream_upstream_zone_module.c
--- a/src/stream/ngx_stream_upstream_zone_module.c Mon Sep 18 11:09:41 2017 +0300
+++ b/src/stream/ngx_stream_upstream_zone_module.c Fri Sep 22 13:10:49 2017 +0300
@@ -278,7 +278,7 @@ ngx_stream_upstream_zone_copy_peer(ngx_s
dst->server.data = NULL;
}
- dst->sockaddr = ngx_slab_calloc_locked(pool, NGX_SOCKADDRLEN);
+ dst->sockaddr = ngx_slab_calloc_locked(pool, sizeof(ngx_sockaddr_t));
if (dst->sockaddr == NULL) {
goto failed;
}
More information about the nginx-devel
mailing list