remove unused condition

There is no need to check "filter" first time.
because filter is always 0.

so !filter is always 1 in first if statement.