1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

Merge PR #669: src/Mayaqua/Network.c: silence coverity on "Unchecked return value"

This commit is contained in:
Davide Beatrici 2018-08-23 10:50:30 +02:00 committed by GitHub
commit e530932df6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11288,7 +11288,7 @@ SOCK *NewUDP4(UINT port, IP *ip)
if (port != 0) if (port != 0)
{ {
bool true_flag = true; bool true_flag = true;
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool)); (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool));
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0) if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0)
{ {
bool false_flag = false; bool false_flag = false;
@ -11385,7 +11385,7 @@ SOCK *NewUDP6(UINT port, IP *ip)
if (port != 0) if (port != 0)
{ {
bool true_flag = true; bool true_flag = true;
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool)); (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool));
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0) if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0)
{ {
bool false_flag = false; bool false_flag = false;