[MPlayer-cvslog] r32600 - trunk/sub/sub_cc.c
reimar
subversion at mplayerhq.hu
Sun Nov 7 19:27:24 CET 2010
Author: reimar
Date: Sun Nov 7 19:27:24 2010
New Revision: 32600
Log:
Use calloc instead of malloc+memset.
Modified:
trunk/sub/sub_cc.c
Modified: trunk/sub/sub_cc.c
==============================================================================
--- trunk/sub/sub_cc.c Sun Nov 7 19:13:22 2010 (r32599)
+++ trunk/sub/sub_cc.c Sun Nov 7 19:27:24 2010 (r32600)
@@ -134,8 +134,7 @@ static void append_char(char c)
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;
}
More information about the MPlayer-cvslog
mailing list