diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-06-24 04:03:52 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-06-24 04:03:52 +0000 |
commit | c7024d8a024ceeaae8f3980d0f4bf9f267662d1d (patch) | |
tree | 7fa7bad4e7a773b4e62f03a5a00e82455966bc88 /udptl.c | |
parent | 1c17258f4ed6be55ab9349f723686ca24513c8cb (diff) |
ast_calloc, instead of malloc and memset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'udptl.c')
-rw-r--r-- | udptl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -772,9 +772,8 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc int i; long int flags; - if ((udptl = malloc(sizeof(struct ast_udptl))) == NULL) + if (!(udptl = ast_calloc(1, sizeof(*udptl)))) return NULL; - memset(udptl, 0, sizeof(struct ast_udptl)); if (udptlfectype == 2) udptl->error_correction_scheme = UDPTL_ERROR_CORRECTION_FEC; |