cppcheck performance fixes in addons/
Check return value