fix a gcc warning, avoid an unnecessary operation