No if's or while's in a switch case?

As an example:

if (digitalRead(legsw == HIGH))

should be:

if (digitalRead(legsw) == HIGH)

Subtle but important.