Mercurial > mplayer.hg
changeset 32513:a150a1bc458d
Use calloc instead of malloc+memset.
author | reimar |
---|---|
date | Sun, 07 Nov 2010 18:27:24 +0000 |
parents | 024358659ebd |
children | 81c9be1beeec |
files | sub/sub_cc.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sub/sub_cc.c Sun Nov 07 18:13:22 2010 +0000 +++ b/sub/sub_cc.c Sun Nov 07 18:27:24 2010 +0000 @@ -134,8 +134,7 @@ if(!bb->lines) {bb->lines++; cursor_pos=0;} if(bb->text[bb->lines - 1]==NULL) { - bb->text[bb->lines - 1]=malloc(CC_MAX_LINE_LENGTH); - memset(bb->text[bb->lines - 1],0,CC_MAX_LINE_LENGTH); + bb->text[bb->lines - 1] = calloc(1, CC_MAX_LINE_LENGTH); cursor_pos=0; }