Mercurial > mplayer.hg
changeset 19606:832d6f6f805e
Do not cast calloc/malloc results
author | reimar |
---|---|
date | Thu, 31 Aug 2006 18:43:41 +0000 |
parents | 8c5212c50e87 |
children | f83205ac7cfb |
files | stream/stream_radio.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_radio.c Thu Aug 31 18:35:32 2006 +0000 +++ b/stream/stream_radio.c Thu Aug 31 18:43:41 2006 +0000 @@ -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;