Change functional static variable to Global variable. No STATIC modifier is recommended though it is defined in Base.h. It is for consistency.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6314 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-10-31 02:07:08 +00:00
parent 19b15d6310
commit e48813da4b

View File

@ -22,6 +22,8 @@ Abstract:
#include "MiscSubclassDriver.h" #include "MiscSubclassDriver.h"
BOOLEAN mDone = FALSE;
// //
// //
// //
@ -69,8 +71,6 @@ Returns:
LogRecordData was NULL. LogRecordData was NULL.
--*/ --*/
{ {
STATIC BOOLEAN Done = FALSE;
// //
// First check for invalid parameters. // First check for invalid parameters.
// //
@ -86,7 +86,7 @@ Returns:
// //
// Is this the first time through this function? // Is this the first time through this function?
// //
if (!Done) { if (!mDone) {
// //
// Yes, this is the first time. Inspect/Change the contents of the // Yes, this is the first time. Inspect/Change the contents of the
// RecordData structure. // RecordData structure.
@ -100,19 +100,19 @@ Returns:
// //
// ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD
// //
// Set Done flag to TRUE for next pass through this function. // Set mDone flag to TRUE for next pass through this function.
// Set *LogRecordData to TRUE so data will get logged to Data Hub. // Set *LogRecordData to TRUE so data will get logged to Data Hub.
// //
Done = TRUE; mDone = TRUE;
*LogRecordData = TRUE; *LogRecordData = TRUE;
} else { } else {
// //
// No, this is the second time. Reset the state of the Done flag // No, this is the second time. Reset the state of the mDone flag
// to FALSE and tell the data logger that there is no more data // to FALSE and tell the data logger that there is no more data
// to be logged for this record type. If any memory allocations // to be logged for this record type. If any memory allocations
// were made by earlier passes, they must be released now. // were made by earlier passes, they must be released now.
// //
Done = FALSE; mDone = FALSE;
*LogRecordData = FALSE; *LogRecordData = FALSE;
} }