mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Fixed C++ casting problems. free functions returns void
This commit is contained in:
parent
2110049f2f
commit
544718f10d
3 changed files with 15 additions and 16 deletions
|
|
@ -523,7 +523,7 @@ int snd_pcm_info_malloc(snd_pcm_info_t **infop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_info_free(snd_pcm_info_t *info)
|
||||
void snd_pcm_info_free(snd_pcm_info_t *info)
|
||||
{
|
||||
assert(info);
|
||||
free(info);
|
||||
|
|
@ -634,7 +634,7 @@ int snd_pcm_status_malloc(snd_pcm_status_t **statusp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_status_free(snd_pcm_status_t *status)
|
||||
void snd_pcm_status_free(snd_pcm_status_t *status)
|
||||
{
|
||||
assert(status);
|
||||
free(status);
|
||||
|
|
|
|||
|
|
@ -1350,12 +1350,11 @@ int snd_pcm_hw_strategy_simple_choices_next_value(snd_pcm_hw_params_t *params,
|
|||
return -1;
|
||||
}
|
||||
|
||||
int snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy)
|
||||
void snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy)
|
||||
{
|
||||
if (strategy->free)
|
||||
strategy->free(strategy);
|
||||
free(strategy);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_hw_strategy_simple(snd_pcm_hw_strategy_t **strategyp,
|
||||
|
|
@ -2343,7 +2342,7 @@ int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **paramsp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_hw_params_free(snd_pcm_hw_params_t *params)
|
||||
void snd_pcm_hw_params_free(snd_pcm_hw_params_t *params)
|
||||
{
|
||||
free(params);
|
||||
}
|
||||
|
|
@ -2368,7 +2367,7 @@ int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **paramsp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_sw_params_free(snd_pcm_sw_params_t *params)
|
||||
void snd_pcm_sw_params_free(snd_pcm_sw_params_t *params)
|
||||
{
|
||||
free(params);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue