From 2d81eed739e47be322308a0aca3986a53afbfff6 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 8 Jul 2012 16:04:39 +0000 Subject: [PATCH] [SMSS] - Fix an NTSTATUS vs boolean issue - Fix an MSVC warning svn path=/trunk/; revision=56853 --- reactos/base/system/smss2/smss.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/reactos/base/system/smss2/smss.c b/reactos/base/system/smss2/smss.c index bb3a4f1d86e..8da368aa661 100644 --- a/reactos/base/system/smss2/smss.c +++ b/reactos/base/system/smss2/smss.c @@ -160,8 +160,8 @@ SmpInvokeAutoChk(IN PUNICODE_STRING FileName, IN PUNICODE_STRING Arguments, IN ULONG Flags) { - ANSI_STRING DestinationString; - CHAR SourceString[256]; + ANSI_STRING MessageString; + CHAR MessageBuffer[256]; UNICODE_STRING Destination; WCHAR Buffer[1024]; BOOLEAN BootState, BootOkay, ShutdownOkay; @@ -173,13 +173,13 @@ SmpInvokeAutoChk(IN PUNICODE_STRING FileName, if (Flags & SMP_INVALID_PATH) { /* It wasn't, so create an error message to print on the screen */ - sprintf_nt(SourceString, + sprintf_nt(MessageBuffer, "%wZ program not found - skipping AUTOCHECK\n", FileName); - RtlInitAnsiString(&DestinationString, SourceString); - if (RtlAnsiStringToUnicodeString(&Destination, - &DestinationString, - TRUE)) + RtlInitAnsiString(&MessageString, MessageBuffer); + if (NT_SUCCESS(RtlAnsiStringToUnicodeString(&Destination, + &MessageString, + TRUE))) { /* And show it */ NtDisplayString(&Destination); @@ -469,7 +469,7 @@ _main(IN INT argc, ASSERT(NT_SUCCESS(Status)); /* Save the debug flag if it was passed */ - if (DebugFlag) SmpDebug = DebugFlag; + if (DebugFlag) SmpDebug = DebugFlag != 0; /* Build the hard error parameters */ Parameters[0] = (ULONG_PTR)&DbgString;