Make MdeModulePkg GCC clean.
It also pass ICC+IPF and MYTOOLS+EBC build. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -755,7 +755,7 @@ DhcpHandleRequest (
|
||||
//
|
||||
Message = NULL;
|
||||
|
||||
if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
|
||||
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
|
||||
Message = "Lease confirmed isn't the same as that in the offer";
|
||||
goto REJECT;
|
||||
}
|
||||
@@ -846,7 +846,7 @@ DhcpHandleRenewRebind (
|
||||
// The lease is different from the selected. Don't send a DECLINE
|
||||
// since it isn't existed in the client's FSM.
|
||||
//
|
||||
if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
|
||||
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
@@ -655,7 +655,7 @@ Ip4ConfigOnDhcp4Complete (
|
||||
//
|
||||
// Create a route if there is a default router.
|
||||
//
|
||||
if (!EFI_IP4_EQUAL (Dhcp4Mode.RouterAddress, mZeroIp4Addr)) {
|
||||
if (!EFI_IP4_EQUAL (&Dhcp4Mode.RouterAddress, &mZeroIp4Addr)) {
|
||||
Ip4Config->RouteTableSize = 2;
|
||||
|
||||
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));
|
||||
|
@@ -860,8 +860,8 @@ EfiIp4Configure (
|
||||
}
|
||||
|
||||
if (!Current->UseDefaultAddress &&
|
||||
(!EFI_IP4_EQUAL (Current->StationAddress, IpConfigData->StationAddress) ||
|
||||
!EFI_IP4_EQUAL (Current->SubnetMask, IpConfigData->SubnetMask))) {
|
||||
(!EFI_IP4_EQUAL (&Current->StationAddress, &IpConfigData->StationAddress) ||
|
||||
!EFI_IP4_EQUAL (&Current->SubnetMask, &IpConfigData->SubnetMask))) {
|
||||
Status = EFI_ALREADY_STARTED;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
@@ -978,7 +978,7 @@ Ip4Groups (
|
||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
|
||||
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (Group, *GroupAddress)) {
|
||||
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
|
||||
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
@@ -306,7 +306,7 @@ Ip4Output (
|
||||
// them. Tag each fragment other than the first one as spawn from it.
|
||||
//
|
||||
Mtu = IpSb->SnpMode.MaxPacketSize;
|
||||
HeadLen = sizeof (IP4_HEAD) + (OptLen + 3) &~0x03;
|
||||
HeadLen = sizeof (IP4_HEAD) + ((OptLen + 3) & (~0x03));
|
||||
Head->Id = mIp4Id++;
|
||||
|
||||
if (Packet->TotalSize + HeadLen > Mtu) {
|
||||
|
@@ -59,7 +59,7 @@ EfiMtftp4GetModeData (
|
||||
OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
|
||||
|
||||
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
|
||||
ModeData->ConfigData = Instance->Config;
|
||||
CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));
|
||||
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
|
||||
ModeData->SupportedOptoins = mMtftp4SupportedOptions;
|
||||
ModeData->UnsupportedOptionCount = 0;
|
||||
@@ -228,7 +228,7 @@ EfiMtftp4Configure (
|
||||
return EFI_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
Instance->Config = *ConfigData;
|
||||
CopyMem(&Instance->Config, ConfigData, sizeof (*ConfigData));;
|
||||
Instance->State = MTFTP4_STATE_CONFIGED;
|
||||
|
||||
NET_RESTORE_TPL (OldTpl);
|
||||
|
@@ -1146,9 +1146,6 @@ PxebcBisDetect (
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static VOID *BCNotifyReg;
|
||||
|
||||
|
||||
/**
|
||||
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.
|
||||
|
||||
@@ -1559,7 +1556,7 @@ BcStop (
|
||||
return StatCode;
|
||||
}
|
||||
|
||||
const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };
|
||||
const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -51,7 +51,7 @@ Abstract:
|
||||
|
||||
#define SUPPORT_IPV6 0
|
||||
|
||||
#define PXE_BASECODE_DEVICE_SIGNATURE 'pxed'
|
||||
#define PXE_BASECODE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'd')
|
||||
|
||||
//
|
||||
// Determine the classes of IPv4 address
|
||||
@@ -166,7 +166,7 @@ typedef struct {
|
||||
//
|
||||
//
|
||||
//
|
||||
#define LOADFILE_DEVICE_SIGNATURE 'pxel'
|
||||
#define LOADFILE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'l')
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
|
@@ -26,8 +26,8 @@ STATIC EFI_PXE_BASE_CODE_UDP_PORT DhcpServerPort = DHCP_SERVER_PORT;
|
||||
STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;
|
||||
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;
|
||||
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort
|
||||
STATIC EFI_IP_ADDRESS BroadcastIP = { 0xffffffff };
|
||||
STATIC EFI_IP_ADDRESS DefaultSubnetMask = { 0xffffff00 };
|
||||
STATIC EFI_IP_ADDRESS BroadcastIP = {{0xffffffff}};
|
||||
STATIC EFI_IP_ADDRESS DefaultSubnetMask = {{0xffffff00}};
|
||||
|
||||
typedef union {
|
||||
DHCPV4_OP_STRUCT *OpPtr;
|
||||
@@ -1470,7 +1470,7 @@ Release (
|
||||
|
||||
CopyMem (
|
||||
&DHCPRELEASEoptions.DhcServerIpPtr,
|
||||
&(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
|
||||
(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
|
||||
sizeof DHCPRELEASEoptions.DhcServerIpPtr
|
||||
);
|
||||
|
||||
|
@@ -681,6 +681,8 @@ Tcp4Dispatcher (
|
||||
|
||||
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);
|
||||
|
||||
default:
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@@ -35,7 +35,7 @@ NET_LIST_ENTRY mTcpListenQue = {
|
||||
|
||||
TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;
|
||||
|
||||
STATIC CHAR16 *mTcpStateName[] = {
|
||||
CHAR16 *mTcpStateName[] = {
|
||||
L"TCP_CLOSED",
|
||||
L"TCP_LISTEN",
|
||||
L"TCP_SYN_SENT",
|
||||
@@ -267,7 +267,7 @@ TcpFindTcbByPeer (
|
||||
NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
|
||||
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
||||
|
||||
if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
|
||||
if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
|
||||
(LocalPort == Tcb->LocalEnd.Port)) {
|
||||
|
||||
return TRUE;
|
||||
@@ -277,7 +277,7 @@ TcpFindTcbByPeer (
|
||||
NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
|
||||
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
||||
|
||||
if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
|
||||
if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
|
||||
(LocalPort == Tcb->LocalEnd.Port)) {
|
||||
|
||||
return TRUE;
|
||||
|
@@ -33,7 +33,6 @@ TcpGetUint16 (
|
||||
return NTOHS (Value);
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
TcpPutUint16 (
|
||||
IN UINT8 *Buf,
|
||||
|
@@ -424,7 +424,7 @@ Udp4FindInstanceByPort (
|
||||
continue;
|
||||
}
|
||||
|
||||
if (EFI_IP4_EQUAL (ConfigData->StationAddress, *Address) &&
|
||||
if (EFI_IP4_EQUAL (&ConfigData->StationAddress, Address) &&
|
||||
(ConfigData->StationPort == Port)) {
|
||||
//
|
||||
// if both the address and the port are the same, return TRUE.
|
||||
@@ -566,8 +566,8 @@ Udp4IsReconfigurable (
|
||||
}
|
||||
|
||||
if (!NewConfigData->UseDefaultAddress &&
|
||||
(!EFI_IP4_EQUAL (NewConfigData->StationAddress, OldConfigData->StationAddress) ||
|
||||
!EFI_IP4_EQUAL (NewConfigData->SubnetMask, OldConfigData->SubnetMask))) {
|
||||
(!EFI_IP4_EQUAL (&NewConfigData->StationAddress, &OldConfigData->StationAddress) ||
|
||||
!EFI_IP4_EQUAL (&NewConfigData->SubnetMask, &OldConfigData->SubnetMask))) {
|
||||
//
|
||||
// If the instance doesn't use the default address, and the new address or
|
||||
// new subnet mask is different from the old values.
|
||||
@@ -576,14 +576,14 @@ Udp4IsReconfigurable (
|
||||
}
|
||||
}
|
||||
|
||||
if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, OldConfigData->RemoteAddress)) {
|
||||
if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &OldConfigData->RemoteAddress)) {
|
||||
//
|
||||
// The remoteaddress is not the same.
|
||||
//
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
|
||||
if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
|
||||
//
|
||||
// The RemotePort differs if it's designated in the configdata.
|
||||
//
|
||||
@@ -733,13 +733,13 @@ Udp4ValidateTxToken (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (EFI_IP4_EQUAL (UdpSessionData->DestinationAddress, mZeroIp4Addr)) {
|
||||
if (EFI_IP4_EQUAL (&UdpSessionData->DestinationAddress, &mZeroIp4Addr)) {
|
||||
//
|
||||
// The DestinationAddress specified in the UdpSessionData is 0.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
} else if (EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr)) {
|
||||
} else if (EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr)) {
|
||||
//
|
||||
// the configured RemoteAddress is all zero, and the user doens't override the
|
||||
// destination address.
|
||||
@@ -962,7 +962,7 @@ Udp4LeaveGroup (
|
||||
|
||||
McastIp = Arg;
|
||||
|
||||
if ((McastIp != NULL) && (!EFI_IP4_EQUAL (*McastIp, (UINTN) Item->Key))) {
|
||||
if ((McastIp != NULL) && (!EFI_IP4_EQUAL (McastIp, &(Item->Key)))) {
|
||||
//
|
||||
// McastIp is not NULL and the multicast address contained in the Item
|
||||
// is not the same as McastIp.
|
||||
@@ -1172,16 +1172,16 @@ Udp4MatchDgram (
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr) &&
|
||||
!EFI_IP4_EQUAL (ConfigData->RemoteAddress, Udp4Session->SourceAddress)) {
|
||||
if (!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr) &&
|
||||
!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &Udp4Session->SourceAddress)) {
|
||||
//
|
||||
// This datagram doesn't come from the instance's specified sender.
|
||||
//
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (EFI_IP4_EQUAL (ConfigData->StationAddress, mZeroIp4Addr) ||
|
||||
EFI_IP4_EQUAL (Udp4Session->DestinationAddress, ConfigData->StationAddress)) {
|
||||
if (EFI_IP4_EQUAL (&ConfigData->StationAddress, &mZeroIp4Addr) ||
|
||||
EFI_IP4_EQUAL (&Udp4Session->DestinationAddress, &ConfigData->StationAddress)) {
|
||||
//
|
||||
// The instance is configured to receive datagrams destinated to any station IP or
|
||||
// the destination address of this datagram matches the configured station IP.
|
||||
@@ -1702,7 +1702,7 @@ Udp4IcmpHandler (
|
||||
if (!Instance->Configured ||
|
||||
Instance->ConfigData.AcceptPromiscuous ||
|
||||
Instance->ConfigData.AcceptAnyPort ||
|
||||
EFI_IP4_EQUAL (Instance->ConfigData.StationAddress, mZeroIp4Addr)) {
|
||||
EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)) {
|
||||
//
|
||||
// Don't try to deliver the ICMP error to this instance if it is not configured,
|
||||
// or it's configured to be promiscuous or accept any port or accept all the
|
||||
|
@@ -604,7 +604,7 @@ Udp4Transmit (
|
||||
// Set the SourceAddress, SrcPort and Destination according to the specified
|
||||
// UdpSessionData.
|
||||
//
|
||||
if (!EFI_IP4_EQUAL (UdpSessionData->SourceAddress, mZeroIp4Addr)) {
|
||||
if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {
|
||||
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user