Fix coding style and improve readability and correctness.

(value != 0 != value == 1).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40057 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2011-01-01 21:31:07 +00:00
parent a1712b28a6
commit b03f6b7126

View File

@ -364,10 +364,11 @@ SettingsWindow::MessageReceived(BMessage* message)
}
}
fSettings.SetSwapEnabled(value != 0);
if (value == 1 && fSettings.SwapSize() == 0)
{
off_t min, max;
bool enabled = value != 0;
fSettings.SetSwapEnabled(enabled);
if (enabled && fSettings.SwapSize() == 0) {
off_t min;
off_t max;
_GetSwapFileLimits(min, max);
fSettings.SetSwapSize(min);
}