/** @file\r
Utility functions for UI presentation.\r
\r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
//\r
// Create the refresh event process function.\r
//\r
- if (!CompareGuid (&Statement->RefreshGuid, &gZeroGuid)) {\r
+ if (!IsZeroGuid (&Statement->RefreshGuid)) {\r
CreateRefreshEventForStatement (Statement);\r
}\r
\r
// Create the refresh guid hook event.\r
// If the statement in this form has refresh event or refresh interval, browser will create this event for display engine.\r
//\r
- if ((!CompareGuid (&Statement->RefreshGuid, &gZeroGuid)) || (Statement->RefreshInterval != 0)) {\r
+ if ((!IsZeroGuid (&Statement->RefreshGuid)) || (Statement->RefreshInterval != 0)) {\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
}\r
\r
//\r
// Create the refresh event process function for Form.\r
//\r
- if (!CompareGuid (&gCurrentSelection->Form->RefreshGuid, &gZeroGuid)) {\r
+ if (!IsZeroGuid (&gCurrentSelection->Form->RefreshGuid)) {\r
CreateRefreshEventForForm (gCurrentSelection->Form);\r
if (gDisplayFormData.FormRefreshEvent == NULL) {\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
CopyMem (&Selection->FormSetGuid,&Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));\r
Selection->FormId = Statement->HiiValue.Value.ref.FormId;\r
Selection->QuestionId = Statement->HiiValue.Value.ref.QuestionId;\r
- } else if (!CompareGuid (&Statement->HiiValue.Value.ref.FormSetGuid, &gZeroGuid)) {\r
+ } else if (!IsZeroGuid (&Statement->HiiValue.Value.ref.FormSetGuid)) {\r
if (Selection->Form->ModalForm) {\r
return Status;\r
}\r
@param Action The action request.\r
@param SkipSaveOrDiscard Whether skip save or discard action.\r
\r
- @retval EFI_SUCCESS The call back function excutes successfully.\r
- @return Other value if the call back function failed to excute. \r
+ @retval EFI_SUCCESS The call back function executes successfully.\r
+ @return Other value if the call back function failed to execute.\r
**/\r
EFI_STATUS \r
ProcessCallBackFunction (\r
\r
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);\r
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {\r
+ ZeroMem (Statement->BufferValue, Statement->StorageWidth);\r
CopyMem (Statement->BufferValue, NewString, StrSize (NewString));\r
} else {\r
CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);\r
@param Statement The Question which need to call.\r
@param FormSet The formset this question belong to.\r
\r
- @retval EFI_SUCCESS The call back function excutes successfully.\r
- @return Other value if the call back function failed to excute. \r
+ @retval EFI_SUCCESS The call back function executes successfully.\r
+ @return Other value if the call back function failed to execute.\r
**/\r
EFI_STATUS \r
ProcessRetrieveForQuestion (\r
\r
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);\r
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {\r
+ ZeroMem (Statement->BufferValue, Statement->StorageWidth);\r
CopyMem (Statement->BufferValue, NewString, StrSize (NewString));\r
} else {\r
CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);\r
mCurFakeQestId = 0;\r
\r
do {\r
+\r
+ //\r
+ // Reset Status to prevent the next break from returning incorrect error status.\r
+ //\r
+ Status = EFI_SUCCESS;\r
+\r
//\r
// IFR is updated, force to reparse the IFR binary\r
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and \r