fix issues found by coverage scan
remove unnecessary check, confirmed safe usage
remove unnecessary return
Merge pull request #187 from licaiguo/fix-coverage-scan

fix issues found by coverage scan -- review request #58