medium: Fix coverity NEGATIVE_RETURNS defects
Mercurial revision: c355306a082c102177be1aecd8b07f141eb34aa9