mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
coverity 188318: try to hide fake unused var from coverity
This commit is contained in:
parent
396b42ac6d
commit
b0b10001fe
1 changed files with 7 additions and 1 deletions
|
@ -34,6 +34,9 @@ lws_context_init_server(struct lws_context_creation_info *info,
|
|||
{
|
||||
#if LWS_POSIX
|
||||
int n, opt = 1, limit = 1;
|
||||
#if defined(__linux__) && defined(SO_REUSEPORT)
|
||||
int n1;
|
||||
#endif
|
||||
#endif
|
||||
lws_sockfd_type sockfd;
|
||||
struct lws_vhost *vh;
|
||||
|
@ -132,10 +135,13 @@ lws_context_init_server(struct lws_context_creation_info *info,
|
|||
#endif
|
||||
|
||||
#if defined(__linux__) && defined(SO_REUSEPORT)
|
||||
n = lws_check_opt(vhost->options,
|
||||
n1 = lws_check_opt(vhost->options,
|
||||
LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE);
|
||||
/* keep coverity happy */
|
||||
#if LWS_MAX_SMP > 1
|
||||
n = 1;
|
||||
#else
|
||||
n = n1;
|
||||
#endif
|
||||
if (n && vhost->context->count_threads > 1)
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT,
|
||||
|
|
Loading…
Add table
Reference in a new issue