FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_apr.c
This commit is contained in:
parent
fa40e64916
commit
594203f9b1
|
@ -841,11 +841,9 @@ SWITCH_DECLARE(switch_status_t) switch_socket_opt_set(switch_socket_t *sock, int
|
||||||
|
|
||||||
#if defined(TCP_KEEPIDLE)
|
#if defined(TCP_KEEPIDLE)
|
||||||
r = setsockopt(sock->socketdes, SOL_TCP, TCP_KEEPIDLE, (void *)&on, sizeof(on));
|
r = setsockopt(sock->socketdes, SOL_TCP, TCP_KEEPIDLE, (void *)&on, sizeof(on));
|
||||||
|
#else
|
||||||
|
return SWITCH_STATUS_NOTIMPL;
|
||||||
#endif
|
#endif
|
||||||
if (r == -10) {
|
|
||||||
return SWITCH_STATUS_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return r ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
return r ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -855,12 +853,10 @@ SWITCH_DECLARE(switch_status_t) switch_socket_opt_set(switch_socket_t *sock, int
|
||||||
|
|
||||||
#if defined(TCP_KEEPINTVL)
|
#if defined(TCP_KEEPINTVL)
|
||||||
r = setsockopt(sock->socketdes, SOL_TCP, TCP_KEEPINTVL, (void *)&on, sizeof(on));
|
r = setsockopt(sock->socketdes, SOL_TCP, TCP_KEEPINTVL, (void *)&on, sizeof(on));
|
||||||
|
#else
|
||||||
|
return SWITCH_STATUS_NOTIMPL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (r == -10) {
|
|
||||||
return SWITCH_STATUS_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
return r ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue