cppCheck: Suspicious condition. AFAIK, there is no actual problem with the existing code. 'rv' would only not have the 'expected' value, but the execution path would remain the same. However, the patched code is more logical. We put the returned value in 'rv', then test it against 0.