diff --git a/src/MSBuild/CommandLineSwitches.cs b/src/MSBuild/CommandLineSwitches.cs index 3da040a200a..6ac15c07dec 100644 --- a/src/MSBuild/CommandLineSwitches.cs +++ b/src/MSBuild/CommandLineSwitches.cs @@ -305,12 +305,12 @@ internal static bool IsParameterlessSwitch( { parameterlessSwitch = switchInfo.parameterlessSwitch; duplicateSwitchErrorMessage = switchInfo.duplicateSwitchErrorMessage; - break; + return true; } } } - return parameterlessSwitch != ParameterlessSwitch.Invalid; + return false; } /// @@ -362,12 +362,12 @@ internal static bool IsParameterizedSwitch( missingParametersErrorMessage = switchInfo.missingParametersErrorMessage; unquoteParameters = switchInfo.unquoteParameters; emptyParametersAllowed = switchInfo.emptyParametersAllowed; - break; + return true; } } } - return parameterizedSwitch != ParameterizedSwitch.Invalid; + return false; } ///