]> xenbits.xensource.com Git - libvirt.git/commitdiff
nodeGetFreePages: Push forgotten change
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 24 Sep 2014 13:10:18 +0000 (15:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 25 Sep 2014 08:24:44 +0000 (10:24 +0200)
In the previous patch I've changed the for loop bounds but forgot
to 'git add' changes that adapt the rest of the code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/nodeinfo.c

index 04ae38223e1edb3a3db6e2136a2af8cd8103f3ce..3bc0c3cc475d8abb584c0a6e27df26a2ec45be73 100644 (file)
@@ -2041,7 +2041,7 @@ nodeGetFreePages(unsigned int npages,
         goto cleanup;
     }
 
-    lastCell = MIN(lastCell, startCell + cellCount);
+    lastCell = MIN(lastCell, startCell + (int) cellCount - 1);
 
     for (cell = startCell; cell <= lastCell; cell++) {
         for (i = 0; i < npages; i++) {