diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-07 02:02:21 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-07 02:02:21 +0000 |
commit | b70a580bad335173ac4c6176c771c7e6571aa3fd (patch) | |
tree | d33d338922607ba48b7614ce6f0f2f17e485868f | |
parent | e7cc9dcc375fc75df60303a56b439501d6f60082 (diff) | |
download | edk2-platforms-b70a580bad335173ac4c6176c771c7e6571aa3fd.tar.xz |
Add assertion check for TmpString against NULL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11509 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c index 8ee345e8a7..40d93c5ae0 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c @@ -1293,12 +1293,6 @@ CallDriverHealth ( DriverHealthInfo->MessageList->StringId,
NULL
);
- //
- // Assert if can not retrieve the message string
- //
- ASSERT (TmpString != NULL);
- StrnCat (String, TmpString, StrLen (TmpString));
- FreePool (TmpString);
} else {
//
// Update the string will be displayed base on the driver's health status
@@ -1306,32 +1300,29 @@ CallDriverHealth ( switch(DriverHealthInfo->HealthStatus) {
case EfiDriverHealthStatusRepairRequired:
TmpString = GetStringById (STRING_TOKEN (STR_REPAIR_REQUIRED));
- StrCat (String, TmpString);
break;
case EfiDriverHealthStatusConfigurationRequired:
TmpString = GetStringById (STRING_TOKEN (STR_CONFIGURATION_REQUIRED));
- StrCat (String, TmpString);
break;
case EfiDriverHealthStatusFailed:
TmpString = GetStringById (STRING_TOKEN (STR_OPERATION_FAILED));
- StrCat (String, TmpString);
break;
case EfiDriverHealthStatusReconnectRequired:
TmpString = GetStringById (STRING_TOKEN (STR_RECONNECT_REQUIRED));
- StrCat (String, TmpString);
break;
case EfiDriverHealthStatusRebootRequired:
TmpString = GetStringById (STRING_TOKEN (STR_REBOOT_REQUIRED));
- StrCat (String, TmpString);
break;
default:
TmpString = GetStringById (STRING_TOKEN (STR_DRIVER_HEALTH_HEALTHY));
- StrCat (String, TmpString);
break;
}
- FreePool (TmpString);
}
+ ASSERT (TmpString != NULL);
+ StrCat (String, TmpString);
+ FreePool (TmpString);
+
Token = HiiSetString (HiiHandle, 0, String, NULL);
FreePool (String);
|