9119d9
From 35482a3eec708b45498b575d6bc5c6a556962acf Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <35482a3eec708b45498b575d6bc5c6a556962acf@dist-git>
9119d9
From: Michal Privoznik <mprivozn@redhat.com>
9119d9
Date: Wed, 15 Oct 2014 12:11:14 +0200
9119d9
Subject: [PATCH] nodeGetFreePages: Push forgotten change
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1145048
9119d9
9119d9
In the previous patch I've changed the for loop bounds but forgot
9119d9
to 'git add' changes that adapt the rest of the code.
9119d9
9119d9
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9119d9
(cherry picked from commit 4aa8a68faa86d6e1c6ecaeabcec487ee30eff813)
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/nodeinfo.c | 2 +-
9119d9
 1 file changed, 1 insertion(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
9119d9
index dfde085..34d27a6 100644
9119d9
--- a/src/nodeinfo.c
9119d9
+++ b/src/nodeinfo.c
9119d9
@@ -2045,7 +2045,7 @@ nodeGetFreePages(unsigned int npages,
9119d9
         goto cleanup;
9119d9
     }
9119d9
 
9119d9
-    lastCell = MIN(lastCell, startCell + cellCount);
9119d9
+    lastCell = MIN(lastCell, startCell + (int) cellCount - 1);
9119d9
 
9119d9
     for (cell = startCell; cell <= lastCell; cell++) {
9119d9
         for (i = 0; i < npages; i++) {
9119d9
-- 
9119d9
2.1.3
9119d9