covert to unix
fix compile warning of singned-unsigned comparison