Refine code to make it more safely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

(based on FatPkg commit 059c24212d10c63351e377636b73a22e480a024b)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Eric Dong 2014-06-25 05:17:32 +00:00 committed by Jordan Justen
parent 71debf97fe
commit 944ac8ab53
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@ -124,6 +124,7 @@ Returns:
UINT8 FileAttributes;
BOOLEAN WriteMode;
DirEnt = NULL;
Volume = OFile->Volume;
ASSERT_VOLUME_LOCKED (Volume);
WriteMode = (BOOLEAN) (OpenMode & EFI_FILE_MODE_WRITE);
@ -159,6 +160,7 @@ Returns:
return Status;
}
ASSERT (DirEnt != NULL);
Status = FatOpenDirEnt (OFile, DirEnt);
if (EFI_ERROR (Status)) {
return Status;