mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +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:
committed by
Moataz Elmasry
parent
a238b7450d
commit
596493e1a1
@ -18452,38 +18452,35 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
||||
}
|
||||
|
||||
// Listener list update
|
||||
if (p != NULL)
|
||||
RPC_LISTENER_LIST t;
|
||||
Zero(&t, sizeof(RPC_LISTENER_LIST));
|
||||
if (CALL(hWnd, ScEnumListener(p->Rpc, &t)))
|
||||
{
|
||||
RPC_LISTENER_LIST t;
|
||||
Zero(&t, sizeof(RPC_LISTENER_LIST));
|
||||
if (CALL(hWnd, ScEnumListener(p->Rpc, &t)))
|
||||
LVB *b = LvInsertStart();
|
||||
for (i = 0;i < t.NumPort;i++)
|
||||
{
|
||||
LVB *b = LvInsertStart();
|
||||
for (i = 0;i < t.NumPort;i++)
|
||||
wchar_t tmp[MAX_SIZE];
|
||||
wchar_t *status;
|
||||
UINT icon;
|
||||
UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t.Ports[i]);
|
||||
|
||||
status = _UU("CM_LISTENER_ONLINE");
|
||||
icon = ICO_PROTOCOL;
|
||||
if (t.Errors[i])
|
||||
{
|
||||
wchar_t tmp[MAX_SIZE];
|
||||
wchar_t *status;
|
||||
UINT icon;
|
||||
UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t.Ports[i]);
|
||||
|
||||
status = _UU("CM_LISTENER_ONLINE");
|
||||
icon = ICO_PROTOCOL;
|
||||
if (t.Errors[i])
|
||||
{
|
||||
status = _UU("CM_LISTENER_ERROR");
|
||||
icon = ICO_PROTOCOL_X;
|
||||
}
|
||||
else if (t.Enables[i] == false)
|
||||
{
|
||||
status = _UU("CM_LISTENER_OFFLINE");
|
||||
icon = ICO_PROTOCOL_OFFLINE;
|
||||
}
|
||||
|
||||
LvInsertAdd(b, icon, (void *)t.Ports[i], 2, tmp, status);
|
||||
status = _UU("CM_LISTENER_ERROR");
|
||||
icon = ICO_PROTOCOL_X;
|
||||
}
|
||||
LvInsertEnd(b, hWnd, L_LISTENER);
|
||||
FreeRpcListenerList(&t);
|
||||
else if (t.Enables[i] == false)
|
||||
{
|
||||
status = _UU("CM_LISTENER_OFFLINE");
|
||||
icon = ICO_PROTOCOL_OFFLINE;
|
||||
}
|
||||
|
||||
LvInsertAdd(b, icon, (void *)t.Ports[i], 2, tmp, status);
|
||||
}
|
||||
LvInsertEnd(b, hWnd, L_LISTENER);
|
||||
FreeRpcListenerList(&t);
|
||||
}
|
||||
|
||||
// Get the DDNS client state
|
||||
|
Reference in New Issue
Block a user