[#2212] CID26075, CID26049, CID26004, and CID25974:

passed sizeof appropriate arguments
[#2212] CID26067:

checked return value for error
[#2212] CID26048:

early return on error found instead of assignment to a stsus variable
that is overwritten
[#2212] CID25997:

checked return code for error
[#858] Removed parentheses around return values; return isn't a function