Fix issues reported by Scrutinizer.

Signed-off-by: Ashutosh Dhundhara <ashutoshdhundhara@yahoo.com>
Merge pull request #1337 from ashutoshdhundhara/scrutinizer_fix

Fix issues reported by Scrutinizer.