remove a redundant conditional branching