fix coverity issue and convert format to unix