fix style.
fix cppcheck warnings.