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

[XENBUS PATCH v2 1/5] Cleanup duplicate error variables in TryAutoReboot



These variables should also be DWORD instead of HRESULT.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/monitor/monitor.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 185838f..3a166db 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -459,7 +459,6 @@ TryAutoReboot(
     )
 {
     PMONITOR_CONTEXT    Context = &MonitorContext;
-    HRESULT             Result;
     DWORD               Type;
     DWORD               AutoReboot;
     DWORD               RebootCount;
@@ -469,7 +468,7 @@ TryAutoReboot(
     PTCHAR              Description;
     PTCHAR              Text;
     DWORD               TextLength;
-    HRESULT             Error;
+    DWORD               Error;
 
     Length = sizeof (DWORD);
 
@@ -547,12 +546,12 @@ TryAutoReboot(
     if (Text == NULL)
         goto fail2;
 
-    Result = StringCbPrintf(Text,
-                            TextLength,
-                            TEXT("%s %s"),
-                            Description,
-                            Context->Text);
-    assert(SUCCEEDED(Result));
+    Error = StringCbPrintf(Text,
+                           TextLength,
+                           TEXT("%s %s"),
+                           Description,
+                           Context->Text);
+    assert(SUCCEEDED(Error));
 
     free(DisplayName);
 
-- 
2.49.0.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

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