1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-25 17:49:52 +03:00

cppcheck issues:

[src/Cedar/Client.c:2184] -> [src/Cedar/Client.c:2187]: (warning) Either the condition 'rpc==0' is redundant or there is possible null pointer dereference: rpc.
[src/Cedar/Client.c:6032] -> [src/Cedar/Client.c:6035]: (warning) Either the condition 'ret!=0' is redundant or there is possible null pointer dereference: ret.
This commit is contained in:
Ilya Shipitsin 2016-04-30 00:26:58 +05:00
parent 29f93371c3
commit d1ea47eb66

View File

@ -2181,13 +2181,13 @@ BUF *CiAccountToCfg(RPC_CLIENT_CREATE_ACCOUNT *t)
// RPC dispatch routine
PACK *CiRpcDispatch(RPC *rpc, char *name, PACK *p)
{
CLIENT *c = rpc->Param;
PACK *ret;
// Validate arguments
if (rpc == NULL || name == NULL || p == NULL)
{
return NULL;
}
CLIENT *c = rpc->Param;
ret = NewPack();
@ -6029,11 +6029,11 @@ L_TRY:
ReleaseSock(s);
ret = ZeroMalloc(sizeof(REMOTE_CLIENT));
ret->Rpc = rpc;
rpc->Param = ret;
if (ret != NULL)
{
ret->Rpc = rpc;
RPC_CLIENT_VERSION t;
Zero(&t, sizeof(t));
CcGetClientVersion(ret, &t);