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

@@ -66,12 +66,12 @@ static int resynch_jb(struct fixed_jb *jb, void *data, long ms, long ts, long no
static inline struct fixed_jb_frame *alloc_jb_frame(struct fixed_jb *jb)
{
return ast_calloc(1, sizeof(struct fixed_jb_frame));
return ast_calloc(1, sizeof(*jb));
}
static inline void release_jb_frame(struct fixed_jb *jb, struct fixed_jb_frame *frame)
{
free(frame);
ast_free(frame);
}
static void get_jb_head(struct fixed_jb *jb, struct fixed_jb_frame *frame)
@@ -131,7 +131,7 @@ void fixed_jb_destroy(struct fixed_jb *jb)
/* jitterbuf MUST be empty before it can be destroyed */
ASSERT(jb->frames == NULL);
free(jb);
ast_free(jb);
}