[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH v2] Fix some SDV issues



Fix issues where variables were redefined inside a code block (by getting
rid of those variables)

Suggested-by: Owen Smith <owen.smith@xxxxxxxxxx>
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenbus/balloon.c | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/xenbus/balloon.c b/src/xenbus/balloon.c
index dab4d81..7c1754c 100644
--- a/src/xenbus/balloon.c
+++ b/src/xenbus/balloon.c
@@ -465,32 +465,17 @@ BalloonReleasePfnArray(
 
     Index = 0;
     while (Index < Requested) {
-        ULONG       Next = Index;
-        LONGLONG    Start;
-        LONGLONG    End;
         NTSTATUS    status;
 
-        while (Next + 1 < Requested) {
-            ASSERT3U((ULONGLONG)Context->PfnArray[Next], <, 
(ULONGLONG)Context->PfnArray[Next + 1]);
-
-            if ((ULONGLONG)Context->PfnArray[Next + 1] != 
(ULONGLONG)Context->PfnArray[Next] + 1)
-                break;
-
-            Next++;
-        }
-
-        Start = (LONGLONG)Context->PfnArray[Index];
-        End = (LONGLONG)Context->PfnArray[Next];
-
         status = XENBUS_RANGE_SET(Put,
                                   &Context->RangeSetInterface,
                                   Context->RangeSet,
-                                  Start,
-                                  End + 1 - Start);
+                                  (LONGLONG)Context->PfnArray[Index],
+                                  1);
         if (!NT_SUCCESS(status))
             break;
 
-        Index = Next + 1;
+        Index++;
     }
     Requested = Index;
 
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.