dodgy code cleanup (Coverity)