mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
nodeinfo: Prefer MIN in nodeGetFreePages
It's better to use a macro instead of if-else construct. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
60c4ae454e
commit
f8857c8f88
@ -2041,9 +2041,7 @@ nodeGetFreePages(unsigned int npages,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
lastCell = startCell + cellCount;
|
||||
if (startCell + cellCount < lastCell)
|
||||
lastCell = startCell + cellCount;
|
||||
lastCell = MIN(lastCell, startCell + cellCount);
|
||||
|
||||
for (cell = startCell; cell < lastCell; cell++) {
|
||||
for (i = 0; i < npages; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user