--- libaitrpc/src/cli.c 2011/07/14 02:13:24 1.2.2.1 +++ libaitrpc/src/cli.c 2011/07/14 02:36:57 1.2.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.2.2.1 2011/07/14 02:13:24 misho Exp $ +* $Id: cli.c,v 1.2.2.2 2011/07/14 02:36:57 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -251,7 +251,7 @@ rpc_cli_execCall(rpc_cli_t *cli, const char *csModule, fd_set fds; u_char buf[BUFSIZ], str[MAXPATHLEN + UCHAR_MAX + 1], *data; struct tagRPCCall *rpc = (struct tagRPCCall*) buf; - struct tagRPCRet *rrpc; + struct tagRPCRet *rrpc = NULL; int ret = 0, Limit = 0; register int i; rpc_val_t *v; @@ -344,8 +344,8 @@ rpc_cli_execCall(rpc_cli_t *cli, const char *csModule, if (ret < sizeof(struct tagRPCRet)) { rpc_SetErr(EMSGSIZE, "Error:: too short RPC packet ...\n"); return -4; - } else - rrpc = (struct tagRPCRet*) buf; + } + rrpc = (struct tagRPCRet*) buf; /* check RPC packet session info */ if (memcmp(&rrpc->ret_session, cli->cli_parent, sizeof rrpc->ret_session)) { rpc_SetErr(EINVAL, "Error:: get invalid RPC session ...\n");