fix issues found by svace static code analyzer
each commit here represents a fix for a separate issue found by svace. i hope each commit message is clear enough so you can understand the essence of each problem
each commit here represents a fix for a separate issue found by svace. i hope each commit message is clear enough so you can understand the essence of each problem