# HG changeset patch # User reimar # Date 1289154444 0 # Node ID a150a1bc458d7a905b070ed330f04ecfb5e23955 # Parent 024358659ebdcbe8634b4e38902409b34161a7ae Use calloc instead of malloc+memset. diff -r 024358659ebd -r a150a1bc458d sub/sub_cc.c --- 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; }