diff options
author | Chris Robinson <[email protected]> | 2013-03-13 23:36:45 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-03-13 23:36:45 -0700 |
commit | 2486f13dae69fda15dec9e4aa1c61e7b235d62ff (patch) | |
tree | 97873ce7ca7f6d1cafab4000a7f51c68741ff137 | |
parent | 3fd0f23e48fc71718f438e035ffb09d4ba9a47a3 (diff) |
Remove unnecessary NULL checks
-rw-r--r-- | Alc/alcChorus.c | 18 | ||||
-rw-r--r-- | Alc/alcFlanger.c | 18 |
2 files changed, 14 insertions, 22 deletions
diff --git a/Alc/alcChorus.c b/Alc/alcChorus.c index 5a97ff17..5a25d4d1 100644 --- a/Alc/alcChorus.c +++ b/Alc/alcChorus.c @@ -58,18 +58,14 @@ static ALvoid ChorusDestroy(ALeffectState *effect) { ALchorusState *state = (ALchorusState*)effect; - if (state) + if(state) { - if (state->SampleBufferLeft != NULL) - { - free(state->SampleBufferLeft); - state->SampleBufferLeft = NULL; - } - if (state->SampleBufferRight != NULL) - { - free(state->SampleBufferRight); - state->SampleBufferRight = NULL; - } + free(state->SampleBufferLeft); + state->SampleBufferLeft = NULL; + + free(state->SampleBufferRight); + state->SampleBufferRight = NULL; + free(state); } } diff --git a/Alc/alcFlanger.c b/Alc/alcFlanger.c index a1047c01..d5764706 100644 --- a/Alc/alcFlanger.c +++ b/Alc/alcFlanger.c @@ -58,18 +58,14 @@ static ALvoid FlangerDestroy(ALeffectState *effect) { ALflangerState *state = (ALflangerState*)effect; - if (state) + if(state) { - if (state->SampleBufferLeft != NULL) - { - free(state->SampleBufferLeft); - state->SampleBufferLeft = NULL; - } - if (state->SampleBufferRight != NULL) - { - free(state->SampleBufferRight); - state->SampleBufferRight = NULL; - } + free(state->SampleBufferLeft); + state->SampleBufferLeft = NULL; + + free(state->SampleBufferRight); + state->SampleBufferRight = NULL; + free(state); } } |