remove duplicate condition already present a line upper
fix format
fix incompatible pointer