1. Fixed one bug in ConPlatform.c, add NULL judgment.

2. Fixed one type in UgaDraw.h.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3976 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2007-09-29 02:57:38 +00:00
parent 327f4e7d26
commit c62a593c90
2 changed files with 42 additions and 45 deletions

View File

@ -739,8 +739,7 @@ Returns:
--*/ --*/
{ {
EFI_DEVICE_PATH_PROTOCOL *DevicePath; EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath1; EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath2;
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst; EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
UINTN Size; UINTN Size;
@ -753,7 +752,7 @@ Returns:
// //
// if performing Delete operation, the NewDevicePath must not be NULL. // if performing Delete operation, the NewDevicePath must not be NULL.
// //
TempDevicePath1 = NULL; TempDevicePath = NULL;
DevicePath = Multi; DevicePath = Multi;
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size); DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
@ -769,14 +768,10 @@ Returns:
} }
} else { } else {
if (Delete) { if (Delete) {
TempDevicePath2 = AppendDevicePathInstance ( TempDevicePath = AppendDevicePathInstance (
TempDevicePath1, NULL,
DevicePathInst DevicePathInst
); );
if (TempDevicePath1 != NULL) {
FreePool (TempDevicePath1);
}
TempDevicePath1 = TempDevicePath2;
} }
} }
@ -785,7 +780,7 @@ Returns:
} }
if (Delete) { if (Delete) {
*NewDevicePath = TempDevicePath1; *NewDevicePath = TempDevicePath;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -878,6 +873,7 @@ Returns:
return Status; return Status;
} }
if (NewVariableDevicePath != NULL) {
Status = gRT->SetVariable ( Status = gRT->SetVariable (
VariableName, VariableName,
&gEfiGlobalVariableGuid, &gEfiGlobalVariableGuid,
@ -887,6 +883,7 @@ Returns:
); );
FreePool (NewVariableDevicePath); FreePool (NewVariableDevicePath);
}
return Status; return Status;
} }

View File

@ -50,7 +50,7 @@ EFI_STATUS
; ;
/** /**
Return the current video mode information. Set the current video mode information.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param HorizontalResolution Current video horizontal resolution in pixels @param HorizontalResolution Current video horizontal resolution in pixels