mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Fixed the first argument to getsockopt().
While here, always initialize the last argument.
This commit is contained in:
parent
37b7de6df7
commit
bf800822df
@ -199,7 +199,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
|
||||
|
||||
#if (NGX_HAVE_SETFIB)
|
||||
|
||||
if (getsockopt(ls[i].setfib, SOL_SOCKET, SO_SETFIB,
|
||||
olen = sizeof(int);
|
||||
|
||||
if (getsockopt(ls[i].fd, SOL_SOCKET, SO_SETFIB,
|
||||
(void *) &ls[i].setfib, &olen)
|
||||
== -1)
|
||||
{
|
||||
@ -215,7 +217,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
|
||||
|
||||
#if (NGX_HAVE_TCP_FASTOPEN)
|
||||
|
||||
if (getsockopt(ls[i].fastopen, IPPROTO_TCP, TCP_FASTOPEN,
|
||||
olen = sizeof(int);
|
||||
|
||||
if (getsockopt(ls[i].fd, IPPROTO_TCP, TCP_FASTOPEN,
|
||||
(void *) &ls[i].fastopen, &olen)
|
||||
== -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user