From cb2dc09164a533fc544c59469f6f8bd7d1cc5e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 14 Apr 2007 18:30:19 +0200 Subject: Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element. (transplanted from 512894f517c423fed0cadeca0d46c6d909403106) --HG-- extra : transplant_source : Q%28%94%F5%17%C4%23%FE%D0%CA%DE%CA%0DF%C6%D9%09%401%06 --- src/input/libreal/real.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input/libreal/real.c') diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index df50f0440..9ea65d9df 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -458,7 +458,7 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt desc->copyright, desc->abstract); header->data=rmff_new_dataheader(0,0); - header->streams = xine_xmalloc(sizeof(rmff_mdpr_t*)*(desc->stream_count+1)); + header->streams = xine_xcalloc((desc->stream_count+1), sizeof(rmff_mdpr_t*)); lprintf("number of streams: %u\n", desc->stream_count); for (i=0; istream_count; i++) { -- cgit v1.2.3 From 5413ef667ff604985850f95e39b4266852356d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 18 Dec 2007 21:56:02 +0100 Subject: Use calloc() when allocating an array of elements. (transplanted from e9e85d6bcc7e9aafb1dc019f3505de2dafe940bf) --HG-- extra : transplant_source : %E9%E8%5Dk%CC%7E%9A%AF%B1%DC%01%9F5%05%DE-%AF%E9%40%BF --- src/input/libreal/real.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input/libreal/real.c') diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index 9ea65d9df..925b0fdf8 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -660,7 +660,7 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwid lprintf("Stream description size: %i\n", size); - description = malloc(sizeof(char)*(size+1)); + description = calloc(size+1, sizeof(char)); if( rtsp_read_data(rtsp_session, description, size) <= 0) { xine_buffer_free(buf); -- cgit v1.2.3 From 95973431372272b749762591cd4b82fe7e587a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 19 Apr 2008 01:54:11 +0200 Subject: Replace xine_xcalloc usage with calloc, for the revisions transplanted from 1.2 series. --- src/input/libreal/real.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input/libreal/real.c') diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index 925b0fdf8..472120895 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -458,7 +458,7 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt desc->copyright, desc->abstract); header->data=rmff_new_dataheader(0,0); - header->streams = xine_xcalloc((desc->stream_count+1), sizeof(rmff_mdpr_t*)); + header->streams = calloc((desc->stream_count+1), sizeof(rmff_mdpr_t*)); lprintf("number of streams: %u\n", desc->stream_count); for (i=0; istream_count; i++) { -- cgit v1.2.3