Its a Bit operation!
if ((myFoo & (myFoo -1)) != 0) //has more than 1 flag
The statement checks if the value of myFoo is not power of two. Or, vice versa, the statement (myFoo & (myFoo -1)) == 0 checks for power of two. The idea is that only single flag values will be power of two. Setting more than one flag will result in a non power of two value of myFoo.
More information can be found in this answer to a similar question: https://stackoverflow.com/a/1662162/2404788.
For more information about bit operations go to http://en.wikipedia.org/wiki/Bitwise_operation