Fix inconsistent early return in GetWslConfigSetting for SwapSizeBytes (#40415)

The SwapSizeBytes case used 'return wslConfigSetting' instead of 'break' like every other case in the switch. While functionally equivalent, this is a copy-paste inconsistency that could mask bugs if common post-switch logic is added later. Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Ben Hillis committed May 4, 2026 at 18:34 UTC ffb635cfea7831200f0d83e1d5911cd4789bf003
1 file changed +1 -1
src/windows/libwsl/WslCoreConfigInterface.cpp
+1 -1
@@ -94,7 +94,7 @@ WslConfigSetting GetWslConfigSetting(WslConfig_t wslConfig, WslConfigEntry wslCo
94 case SwapSizeBytes:
95 static_assert(std::is_same<decltype(wslConfigSetting.UInt64Value), decltype(wslConfig->Config.SwapSizeBytes)>::value);
96 wslConfigSetting.UInt64Value = wslConfig->Config.SwapSizeBytes;
97 - return wslConfigSetting;
97 + break;
98 case SwapFilePath:
99 static_assert(std::is_same<decltype(wslConfigSetting.StringValue), decltype(wslConfig->Config.SwapFilePath.c_str())>::value);
100 wslConfigSetting.StringValue = wslConfig->Config.SwapFilePath.c_str();