Fix gcc warning: enumeral and non-enumeral type in conditional expression

Quick fix to remove two warnings when building with "newer" gcc versions.