This is a very small revert of PR #5227 to simplify the code and eliminate an MSVC warning.
It was pointed out by Timo Kreuzer as probably not doing what I intended and he was correct.
I added this code in PR #5227 to try and correct some return values from SetDIBitsToDevice.
After testing with this new PR, there was no difference in the regression tests for either
1) gdi32:bitmap or 2) gdi32:SetDIBitsToDevice after deleting the code here and the MSVC warning was fixed.