EmulatorPkg:Host: Fix uninitialized variable detected by clang.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <[email protected]>
---
 EmulatorPkg/Unix/Host/PosixFileSystem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/EmulatorPkg/Unix/Host/PosixFileSystem.c 
b/EmulatorPkg/Unix/Host/PosixFileSystem.c
index 40b412e..daf62ef 100644
--- a/EmulatorPkg/Unix/Host/PosixFileSystem.c
+++ b/EmulatorPkg/Unix/Host/PosixFileSystem.c
@@ -393,6 +393,7 @@ PosixFileOpen (
   // BUGBUG: assume an open of root
   // if current location, return current data
   //
+  TrailingDash = FALSE;
   if ((StrCmp (FileName, L"\\") == 0) ||
       (StrCmp (FileName, L".") == 0 && PrivateFile->IsRootDirectory)) {
 OpenRoot:
@@ -401,7 +402,7 @@ OpenRoot:
     goto Done;
   }
 
-  TrailingDash = FALSE;
+
   if (FileName[StrLen (FileName) - 1] == L'\\') {
     TrailingDash = TRUE;
     FileName[StrLen (FileName) - 1]  = 0;
-- 
1.8.5.2 (Apple Git-48)


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to