Remove redundant reboot codes. Use compiler tidy feature.