Skip to content

Commit

Permalink
cppcheck issues:
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
chipitsine committed Apr 29, 2016
1 parent 29f9337 commit d1ea47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cedar/Client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -6029,11 +6029,11 @@ REMOTE_CLIENT *CcConnectRpcEx(char *server_name, char *password, bool *bad_pass,
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);
Expand Down

0 comments on commit d1ea47e

Please sign in to comment.