Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-06-06 21:20:11 +00:00
parent 033a3df22a
commit 9d05ff8ed5
94 changed files with 2530 additions and 2701 deletions

View File

@@ -697,15 +697,18 @@ static int retrans_pkt(void *data)
static int mgcp_postrequest(struct mgcp_endpoint *p, struct mgcp_subchannel *sub,
char *data, int len, unsigned int seqno)
{
struct mgcp_message *msg = ast_malloc(sizeof(*msg) + len);
struct mgcp_message *msg;
struct mgcp_message *cur;
struct mgcp_gateway *gw = ((p && p->parent) ? p->parent : NULL);
struct mgcp_gateway *gw;
struct timeval tv;
msg = ast_malloc(sizeof(*msg) + len);
if (!msg) {
return -1;
}
gw = ((p && p->parent) ? p->parent : NULL);
if (!gw) {
ast_free(msg);
return -1;
}
/* SC