[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XENBUS PATCH v2 1/5] Cleanup duplicate error variables in TryAutoReboot
On 09/06/2025 15:00, Tu Dinh wrote: These variables should also be DWORD instead of HRESULT. Why? According to the docs I have read StringCbPrintf() returns an 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);
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |