func_index is set by the sum of three ternary operators which add, 0:4, 0:2,
and 1:0. Minimum value would be 0+0+0=0, and maximum would be 4+2+1=7.
The conditional checking if func_index is >= 0 and < 8 will always be true.
Removing it.
CID 1226442
func_index += (filter->characteristics == CHARACTERISTICS_HARD_KNEE) ? 0 : 2;
func_index += (GST_AUDIO_INFO_FORMAT (info) == GST_AUDIO_FORMAT_F32) ? 1 : 0;
- if (func_index >= 0 && func_index < 8) {
- filter->process = process_functions[func_index];
- return TRUE;
- }
-
- return FALSE;
+ filter->process = process_functions[func_index];
+ return TRUE;
}
/* GObject vmethod implementations */