Fixed several issues found using a coverity-scan
More coverity findings
Coverity-fixes in armsrc
Merge pull request #2 from holiman/coverity_fixes

Coverity fixes