Skip to content

Commit

Permalink
Do not use the obsolete NGX_SOCKADDRLEN macro.
Browse files Browse the repository at this point in the history
The change in ac120e797d28 re-used the macro which was made obsolete
in adf25b8d0431.
  • Loading branch information
mdocguard committed Sep 22, 2017
1 parent 05e87e1 commit 0cda728
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/http/modules/ngx_http_upstream_zone_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ ngx_http_upstream_zone_copy_peer(ngx_http_upstream_rr_peers_t *peers,
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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stream/ngx_stream_upstream_zone_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ ngx_stream_upstream_zone_copy_peer(ngx_stream_upstream_rr_peers_t *peers,
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;
}
Expand Down

0 comments on commit 0cda728

Please sign in to comment.