Please, no (0!=whatever), use simpler (!whatever) or (whatver != 0)
Also, indent is wrong - no spaces