NetworkPkg: Fix some coding style issues in UDP6 driver

In UDP6Dxe, there are some coding style issues, this patch
is to fix these issues.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
Wang Fan 2018-01-03 17:53:29 +08:00 committed by Fu Siyuan
parent 24ed9cfd23
commit 0f33366483
3 changed files with 17 additions and 15 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Driver Binding functions and Service Binding functions for the Network driver module. Driver Binding functions and Service Binding functions for the Network driver module.
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -164,7 +164,6 @@ Udp6DriverBindingStart (
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
Udp6CleanService (Udp6Service); Udp6CleanService (Udp6Service);
goto EXIT;
} }
EXIT: EXIT:
@ -182,6 +181,7 @@ EXIT:
@param[in] Entry The entry to be removed. @param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@retval EFI_INVALID_PARAMETER Entry is NULL or Context is NULL.
@retval EFI_SUCCESS The entry has been removed successfully. @retval EFI_SUCCESS The entry has been removed successfully.
@retval Others Fail to remove the entry. @retval Others Fail to remove the entry.

View File

@ -158,7 +158,8 @@ Udp6RecycleRxDataWrap (
@param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this @param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this
datagram. datagram.
@return Pointer to the structure wrapping the RxData and the Packet. @return Pointer to the structure wrapping the RxData and the Packet. NULL will
be returned if any error occurs.
**/ **/
UDP6_RXDATA_WRAP * UDP6_RXDATA_WRAP *
@ -1374,7 +1375,8 @@ Udp6RecycleRxDataWrap (
@param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this @param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this
datagram. datagram.
@return Pointer to the structure wrapping the RxData and the Packet. @return Pointer to the structure wrapping the RxData and the Packet. NULL will
be returned if any error occurs.
**/ **/
UDP6_RXDATA_WRAP * UDP6_RXDATA_WRAP *
@ -1598,7 +1600,7 @@ Udp6Demultiplex (
EFI_UDP6_SESSION_DATA *Udp6Session; EFI_UDP6_SESSION_DATA *Udp6Session;
UINTN Enqueued; UINTN Enqueued;
if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) { if (Packet->TotalSize < UDP6_HEADER_SIZE) {
NetbufFree (Packet); NetbufFree (Packet);
return; return;
} }
@ -1850,7 +1852,7 @@ Udp6IcmpHandler (
LIST_ENTRY *Entry; LIST_ENTRY *Entry;
UDP6_INSTANCE_DATA *Instance; UDP6_INSTANCE_DATA *Instance;
if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) { if (Packet->TotalSize < UDP6_HEADER_SIZE) {
NetbufFree (Packet); NetbufFree (Packet);
return; return;
} }

View File

@ -585,7 +585,7 @@ Udp6Transmit (
// //
// If the calculated checksum is 0, fill the Checksum field with all ones. // If the calculated checksum is 0, fill the Checksum field with all ones.
// //
Udp6Header->Checksum = 0XFFFF; Udp6Header->Checksum = 0xffff;
} }
} else { } else {
// //