mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
cov: avoid expression overflow
Keep max memory in MiB (>> 20).
This commit is contained in:
parent
42a43c37de
commit
d32ee0b7ab
@ -641,7 +641,7 @@ static int _get_sysinfo_memory(uint64_t *total_mb, uint64_t *available_mb)
|
||||
{
|
||||
struct sysinfo si = { 0 };
|
||||
|
||||
*total_mb = *available_mb = UINT64_MAX;
|
||||
*total_mb = *available_mb = ((UINT64_MAX) >> 20);
|
||||
|
||||
if (sysinfo(&si) != 0)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user