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:
@@ -364,10 +364,11 @@ SettingsWindow::MessageReceived(BMessage* message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fSettings.SetSwapEnabled(value != 0);
|
bool enabled = value != 0;
|
||||||
if (value == 1 && fSettings.SwapSize() == 0)
|
fSettings.SetSwapEnabled(enabled);
|
||||||
{
|
if (enabled && fSettings.SwapSize() == 0) {
|
||||||
off_t min, max;
|
off_t min;
|
||||||
|
off_t max;
|
||||||
_GetSwapFileLimits(min, max);
|
_GetSwapFileLimits(min, max);
|
||||||
fSettings.SetSwapSize(min);
|
fSettings.SetSwapSize(min);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user