[MPlayer-cvslog] r19612 - trunk/stream/stream_radio.c
reimar
subversion at mplayerhq.hu
Thu Aug 31 20:43:41 CEST 2006
Author: reimar
Date: Thu Aug 31 20:43:41 2006
New Revision: 19612
Modified:
trunk/stream/stream_radio.c
Log:
Do not cast calloc/malloc results
Modified: trunk/stream/stream_radio.c
==============================================================================
--- trunk/stream/stream_radio.c (original)
+++ trunk/stream/stream_radio.c Thu Aug 31 20:43:41 2006
@@ -178,7 +178,7 @@
channels =radio_param_channels;
mp_msg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_ChannelNamesDetected);
- priv->radio_channel_list = (radio_channels_t*)malloc(sizeof(radio_channels_t));
+ priv->radio_channel_list = malloc(sizeof(radio_channels_t));
priv->radio_channel_list->index=1;
priv->radio_channel_list->next=NULL;
priv->radio_channel_list->prev=NULL;
@@ -200,7 +200,7 @@
while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' ';
- priv->radio_channel_current->next = (radio_channels_t*)malloc(sizeof(radio_channels_t));
+ priv->radio_channel_current->next = malloc(sizeof(radio_channels_t));
priv->radio_channel_current->next->index = priv->radio_channel_current->index + 1;
priv->radio_channel_current->next->prev = priv->radio_channel_current;
priv->radio_channel_current->next->next = NULL;
@@ -232,7 +232,7 @@
}else{
if (freq_channel){
mp_msg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_FreqParameterDetected);
- priv->radio_channel_list=(radio_channels_t*)malloc(sizeof(radio_channels_t));
+ priv->radio_channel_list=malloc(sizeof(radio_channels_t));
priv->radio_channel_list->next=NULL;
priv->radio_channel_list->prev=NULL;
priv->radio_channel_list->index=1;
@@ -779,7 +779,7 @@
mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer,
priv->audio_buffer_size,priv->audio_in.blocksize);
/* start capture */
- priv->audio_ringbuffer = (unsigned char*)calloc(1, priv->audio_buffer_size);
+ priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size);
if (!priv->audio_ringbuffer) {
mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AllocateBufferFailed,priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
return STREAM_ERROR;
@@ -941,7 +941,7 @@
if(mode != STREAM_READ)
return STREAM_UNSUPORTED;
- priv=(radio_priv_t*)malloc(sizeof(radio_priv_t));
+ priv=malloc(sizeof(radio_priv_t));
if (!priv)
return STREAM_ERROR;
More information about the MPlayer-cvslog
mailing list