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

remove DoNothing function (improves coverity reports)

This commit is contained in:
Ilya Shipitsin 2018-08-05 12:00:39 +05:00
parent 73371087ef
commit 1c0b961aa5
4 changed files with 3 additions and 23 deletions

View File

@ -343,13 +343,8 @@ void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p, UINT protocol)
data += sizeof(UINT); data += sizeof(UINT);
size -= sizeof(UINT); size -= sizeof(UINT);
if (size >= sizeof(ping_signature) && if (size < sizeof(ping_signature) ||
Cmp(data, ping_signature, sizeof(ping_signature)) == 0) Cmp(data, ping_signature, sizeof(ping_signature)) != 0)
{
// Ignore since a ping packet has been received
DoNothing();
}
else
{ {
// Receive a packet!! // Receive a packet!!
if (se->Ipc != NULL) if (se->Ipc != NULL)

View File

@ -1166,12 +1166,6 @@ void SetThreadName(UINT thread_id, char *name, void *param)
#endif // OS_WIN32 #endif // OS_WIN32
} }
// Do Nothing
UINT DoNothing()
{
return g_zero;
}
// Thread creation (pool) // Thread creation (pool)
THREAD *NewThreadNamed(THREAD_PROC *thread_proc, void *param, char *name) THREAD *NewThreadNamed(THREAD_PROC *thread_proc, void *param, char *name)
{ {
@ -1185,11 +1179,6 @@ THREAD *NewThreadNamed(THREAD_PROC *thread_proc, void *param, char *name)
return NULL; return NULL;
} }
if (IsTrackingEnabled() == false)
{
DoNothing();
}
Inc(thread_count); Inc(thread_count);
LockSk(thread_pool); LockSk(thread_pool);

View File

@ -270,7 +270,6 @@ void GetHomeDirW(wchar_t *path, UINT size);
void AbortExit(); void AbortExit();
void AbortExitEx(char *msg); void AbortExitEx(char *msg);
void YieldCpu(); void YieldCpu();
UINT DoNothing();
LIST *NewThreadList(); LIST *NewThreadList();
void AddThreadToThreadList(LIST *o, THREAD *t); void AddThreadToThreadList(LIST *o, THREAD *t);
void DelThreadFromThreadList(LIST *o, THREAD *t); void DelThreadFromThreadList(LIST *o, THREAD *t);

View File

@ -9206,8 +9206,6 @@ void Win32NetworkTest()
for (i = 0;i < (int)(LIST_NUM(o));i++) for (i = 0;i < (int)(LIST_NUM(o));i++)
{ {
IP_ADAPTER_INDEX_MAP *a = LIST_DATA(o, i); IP_ADAPTER_INDEX_MAP *a = LIST_DATA(o, i);
DoNothing();
} }
ReleaseList(o); ReleaseList(o);
@ -14327,9 +14325,8 @@ void ConnectThreadForTcp(THREAD *thread, void *param)
{ {
ReleaseSock(p->CancelDisconnectSock); ReleaseSock(p->CancelDisconnectSock);
p->CancelDisconnectSock = NULL; p->CancelDisconnectSock = NULL;
LABEL_CANCEL:
DoNothing();
} }
LABEL_CANCEL:
Unlock(p->CancelLock); Unlock(p->CancelLock);
if (ssl_ret == false) if (ssl_ret == false)