remove unused local variable

and a conditional that never evaluates