Mercurial > mplayer.hg
changeset 32607:9a8baaf45cf2
Replace malloc+memset with calloc and use sizeof(*variable).
author | reimar |
---|---|
date | Sat, 11 Dec 2010 22:22:54 +0000 |
parents | c3a24e046795 |
children | 75c7654261d0 |
files | libmpdemux/demux_ts.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c Sat Dec 11 22:19:46 2010 +0000 +++ b/libmpdemux/demux_ts.c Sat Dec 11 22:22:54 2010 +0000 @@ -2184,10 +2184,9 @@ { ES_stream_t *tss; - tss = malloc(sizeof(ES_stream_t)); + tss = calloc(sizeof(*tss), 1); if(! tss) return NULL; - memset(tss, 0, sizeof(ES_stream_t)); tss->pid = pid; tss->last_cc = -1; tss->type = UNKNOWN;