From b63759b175cf9ddd9735ca0d2f803fe62f69c3c3 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 26 Feb 2010 15:01:37 +0000 Subject: Do not cast the results of malloc/calloc/realloc. These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_coreaudio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libao2') diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index 36456f3cc6..dffab4dd2e 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -291,7 +291,7 @@ int b_alive; } /* Retrieve the name of the device. */ - psz_name = (char *)malloc(i_param_size); + psz_name = malloc(i_param_size); err = AudioDeviceGetProperty(devid_def, 0, 0, kAudioDevicePropertyDeviceName, &i_param_size, psz_name); @@ -513,7 +513,7 @@ static int OpenSPDIF(void) } i_streams = i_param_size / sizeof(AudioStreamID); - p_streams = (AudioStreamID *)malloc(i_param_size); + p_streams = malloc(i_param_size); if (p_streams == NULL) { ao_msg(MSGT_AO, MSGL_WARN, "out of memory\n" ); @@ -549,7 +549,7 @@ static int OpenSPDIF(void) } i_formats = i_param_size / sizeof(AudioStreamBasicDescription); - p_format_list = (AudioStreamBasicDescription *)malloc(i_param_size); + p_format_list = malloc(i_param_size); if (p_format_list == NULL) { ao_msg(MSGT_AO, MSGL_WARN, "could not malloc the memory\n" ); @@ -742,7 +742,7 @@ static int AudioDeviceSupportsDigital( AudioDeviceID i_dev_id ) } i_streams = i_param_size / sizeof(AudioStreamID); - p_streams = (AudioStreamID *)malloc(i_param_size); + p_streams = malloc(i_param_size); if (p_streams == NULL) { ao_msg(MSGT_AO,MSGL_V, "out of memory\n"); @@ -791,7 +791,7 @@ static int AudioStreamSupportsDigital( AudioStreamID i_stream_id ) } i_formats = i_param_size / sizeof(AudioStreamBasicDescription); - p_format_list = (AudioStreamBasicDescription *)malloc(i_param_size); + p_format_list = malloc(i_param_size); if (p_format_list == NULL) { ao_msg(MSGT_AO,MSGL_V, "could not malloc the memory\n" ); -- cgit v1.2.3