mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-28 05:40:23 -04:00
remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
This commit is contained in:
parent
45850439b3
commit
4433248bf3
33 changed files with 108 additions and 205 deletions
|
|
@ -449,10 +449,8 @@ static int snd_pcm_adpcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
|||
static int snd_pcm_adpcm_hw_free(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_adpcm_t *adpcm = pcm->private_data;
|
||||
if (adpcm->states) {
|
||||
free(adpcm->states);
|
||||
adpcm->states = 0;
|
||||
}
|
||||
free(adpcm->states);
|
||||
adpcm->states = NULL;
|
||||
return snd_pcm_hw_free(adpcm->plug.gen.slave);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue