mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
resolve several issues identified by cppcheck (#465)
[src/Cedar/Admin.c:13452] -> [src/Cedar/Admin.c:13492]: (warning) Either the condition 'cedar!=NULL' is redundant or there is possible null pointer dereference: cedar. [src/Cedar/SM.c:18455] -> [src/Cedar/SM.c:18379]: (warning) Either the condition 'p!=NULL' is redundant or there is possible null pointer dereference: p. [src/Cedar/SM.c:18455] -> [src/Cedar/SM.c:18491]: (warning) Either the condition 'p!=NULL' is redundant or there is possible null pointer dereference: p. [src/Cedar/SM.c:18455] -> [src/Cedar/SM.c:18506]: (warning) Either the condition 'p!=NULL' is redundant or there is possible null pointer dereference: p. [src/Cedar/Protocol.c:5190] -> [src/Cedar/Protocol.c:5115]: (warning) Either the condition 's!=NULL' is redundant or there is possible null pointer dereference: s. [src/Cedar/Protocol.c:5190] -> [src/Cedar/Protocol.c:5145]: (warning) Either the condition 's!=NULL' is redundant or there is possible null pointer dereference: s. [src/Cedar/Hub.c:5517] -> [src/Cedar/Hub.c:5553]: (warning) Either the condition 'dest!=NULL' is redundant or there is possible null pointer dereference: dest. [src/Cedar/Hub.c:5517] -> [src/Cedar/Hub.c:5556]: (warning) Either the condition 'dest!=NULL' is redundant or there is possible null pointer dereference: dest.
This commit is contained in:
parent
a238b7450d
commit
596493e1a1
@ -13489,7 +13489,7 @@ UINT AdminAccept(CONNECTION *c, PACK *p)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Hub admin mode
|
// Hub admin mode
|
||||||
if (cedar->Server != NULL && cedar->Server->ServerType == SERVER_TYPE_FARM_MEMBER)
|
if (server != NULL && server->ServerType == SERVER_TYPE_FARM_MEMBER)
|
||||||
{
|
{
|
||||||
// Connection with hub admin mode to cluster member is not permitted
|
// Connection with hub admin mode to cluster member is not permitted
|
||||||
return ERR_NOT_ENOUGH_RIGHT;
|
return ERR_NOT_ENOUGH_RIGHT;
|
||||||
|
@ -5514,7 +5514,7 @@ void StorePacketToHubPa(HUB_PA *dest, SESSION *src, void *data, UINT size, PKT *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dest != NULL && src != NULL && dest->Session != NULL && src->Hub != NULL && src->Hub->Option != NULL)
|
if (src != NULL && dest->Session != NULL && src->Hub != NULL && src->Hub->Option != NULL)
|
||||||
{
|
{
|
||||||
if (dest->Session->AdjustMss != 0 ||
|
if (dest->Session->AdjustMss != 0 ||
|
||||||
(dest->Session->IsUsingUdpAcceleration && dest->Session->UdpAccelMss != 0) ||
|
(dest->Session->IsUsingUdpAcceleration && dest->Session->UdpAccelMss != 0) ||
|
||||||
|
@ -5234,7 +5234,7 @@ REDIRECTED:
|
|||||||
|
|
||||||
sess->EnableBulkOnRUDP = false;
|
sess->EnableBulkOnRUDP = false;
|
||||||
sess->EnableHMacOnBulkOfRUDP = false;
|
sess->EnableHMacOnBulkOfRUDP = false;
|
||||||
if (s != NULL && s->IsRUDPSocket && s->BulkRecvKey != NULL && s->BulkSendKey != NULL)
|
if (s->IsRUDPSocket && s->BulkRecvKey != NULL && s->BulkSendKey != NULL)
|
||||||
{
|
{
|
||||||
// Bulk transfer on R-UDP
|
// Bulk transfer on R-UDP
|
||||||
if (PackGetBool(p, "enable_bulk_on_rudp"))
|
if (PackGetBool(p, "enable_bulk_on_rudp"))
|
||||||
|
@ -18452,8 +18452,6 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Listener list update
|
// Listener list update
|
||||||
if (p != NULL)
|
|
||||||
{
|
|
||||||
RPC_LISTENER_LIST t;
|
RPC_LISTENER_LIST t;
|
||||||
Zero(&t, sizeof(RPC_LISTENER_LIST));
|
Zero(&t, sizeof(RPC_LISTENER_LIST));
|
||||||
if (CALL(hWnd, ScEnumListener(p->Rpc, &t)))
|
if (CALL(hWnd, ScEnumListener(p->Rpc, &t)))
|
||||||
@ -18484,7 +18482,6 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
|||||||
LvInsertEnd(b, hWnd, L_LISTENER);
|
LvInsertEnd(b, hWnd, L_LISTENER);
|
||||||
FreeRpcListenerList(&t);
|
FreeRpcListenerList(&t);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Get the DDNS client state
|
// Get the DDNS client state
|
||||||
Zero(&st, sizeof(st));
|
Zero(&st, sizeof(st));
|
||||||
|
Loading…
Reference in New Issue
Block a user