mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastCell = startCell + cellCount;
|
lastCell = MIN(lastCell, startCell + cellCount);
|
||||||
if (startCell + cellCount < lastCell)
|
|
||||||
lastCell = startCell + cellCount;
|
|
||||||
|
|
||||||
for (cell = startCell; cell < lastCell; cell++) {
|
for (cell = startCell; cell < lastCell; cell++) {
|
||||||
for (i = 0; i < npages; i++) {
|
for (i = 0; i < npages; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user