summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/Udp6Dxe/Udp6Impl.c
diff options
context:
space:
mode:
authorWang Fan <fan.wang@intel.com>2018-01-03 17:53:29 +0800
committerFu Siyuan <siyuan.fu@intel.com>2018-01-11 17:08:32 +0800
commit0f333664833319991972d0c12b0978bbd837fde7 (patch)
tree07aa4b7ca5e187bae3c8f440ba223268c5529a06 /NetworkPkg/Udp6Dxe/Udp6Impl.c
parent24ed9cfd23b005511fb1b4007b7522927e86430a (diff)
downloadedk2-0f333664833319991972d0c12b0978bbd837fde7.tar.gz
edk2-0f333664833319991972d0c12b0978bbd837fde7.tar.bz2
edk2-0f333664833319991972d0c12b0978bbd837fde7.zip
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>
Diffstat (limited to 'NetworkPkg/Udp6Dxe/Udp6Impl.c')
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Impl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/NetworkPkg/Udp6Dxe/Udp6Impl.c b/NetworkPkg/Udp6Dxe/Udp6Impl.c
index 25d4e6a80f..458470ce2c 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Impl.c
+++ b/NetworkPkg/Udp6Dxe/Udp6Impl.c
@@ -158,7 +158,8 @@ Udp6RecycleRxDataWrap (
@param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this
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 *
@@ -1374,7 +1375,8 @@ Udp6RecycleRxDataWrap (
@param[in] RxData Pointer to the EFI_UDP6_RECEIVE_DATA of this
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 *
@@ -1598,7 +1600,7 @@ Udp6Demultiplex (
EFI_UDP6_SESSION_DATA *Udp6Session;
UINTN Enqueued;
- if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) {
+ if (Packet->TotalSize < UDP6_HEADER_SIZE) {
NetbufFree (Packet);
return;
}
@@ -1850,7 +1852,7 @@ Udp6IcmpHandler (
LIST_ENTRY *Entry;
UDP6_INSTANCE_DATA *Instance;
- if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) {
+ if (Packet->TotalSize < UDP6_HEADER_SIZE) {
NetbufFree (Packet);
return;
}