From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mx.groups.io with SMTP id smtpd.web09.11035.1607065610790096110 for ; Thu, 03 Dec 2020 23:06:51 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.191, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CnNzJ3cpwzhmMq; Fri, 4 Dec 2020 15:06:20 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Fri, 4 Dec 2020 15:06:40 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] NetworkPkg/DnsDxe: cosmetic fixups Date: Fri, 4 Dec 2020 15:05:03 +0800 Message-ID: <1607065503-29304-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1607065503-29304-1-git-send-email-xiewenyi2@huawei.com> References: <1607065503-29304-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain add whitespace according to coding style. Cc: Maciej Rabeda Cc: Jiaxin Wu Cc: Siyuan Fu Signed-off-by: Wenyi Xie --- NetworkPkg/DnsDxe/DnsImpl.h | 2 +- NetworkPkg/DnsDxe/DnsDhcp.c | 4 ++-- NetworkPkg/DnsDxe/DnsDriver.c | 4 ++-- NetworkPkg/DnsDxe/DnsImpl.c | 8 ++++---- NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h index 10bc399e9ed5..affbb4be8ded 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.h +++ b/NetworkPkg/DnsDxe/DnsImpl.h @@ -125,7 +125,7 @@ typedef struct { EFI_DNS6_COMPLETION_TOKEN *Token; } DNS6_TOKEN_ENTRY; -union _DNS_FLAGS{ +union _DNS_FLAGS { struct { UINT16 RCode:4; UINT16 Zero:3; diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c index 9ea9d7c8f674..8f8b2aab1e32 100644 --- a/NetworkPkg/DnsDxe/DnsDhcp.c +++ b/NetworkPkg/DnsDxe/DnsDhcp.c @@ -131,7 +131,7 @@ ParseDhcp4Ack ( return EFI_OUT_OF_RESOURCES; } - for(Count=0; Count < ServerCount; Count++){ + for (Count=0; Count < ServerCount; Count++) { CopyMem (ServerList + Count, &OptionList[Index]->Data[4 * Count], sizeof (EFI_IPv4_ADDRESS)); } @@ -225,7 +225,7 @@ ParseDhcp6Ack ( return EFI_OUT_OF_RESOURCES; } - for(Count=0; Count < ServerCount; Count++){ + for (Count=0; Count < ServerCount; Count++) { CopyMem (ServerList + Count, &OptionList[Index]->Data[16 * Count], sizeof (EFI_IPv6_ADDRESS)); } diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c index f099da8a5a95..4db0c6bdd1eb 100644 --- a/NetworkPkg/DnsDxe/DnsDriver.c +++ b/NetworkPkg/DnsDxe/DnsDriver.c @@ -197,11 +197,11 @@ DnsDestroyService ( { UdpIoFreeIo (DnsSb->ConnectUdp); - if (DnsSb->TimerToGetMap != NULL){ + if (DnsSb->TimerToGetMap != NULL) { gBS->CloseEvent (DnsSb->TimerToGetMap); } - if (DnsSb->Timer != NULL){ + if (DnsSb->Timer != NULL) { gBS->CloseEvent (DnsSb->Timer); } diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c index 25628a5704f0..2edcb280ac4d 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.c +++ b/NetworkPkg/DnsDxe/DnsImpl.c @@ -799,7 +799,7 @@ UpdateDns4Cache ( Item->DnsCache.Timeout = DnsCacheEntry.Timeout; return EFI_SUCCESS; - }else { + } else { return EFI_ACCESS_DENIED; } } @@ -897,7 +897,7 @@ UpdateDns6Cache ( Item->DnsCache.Timeout = DnsCacheEntry.Timeout; return EFI_SUCCESS; - }else { + } else { return EFI_ACCESS_DENIED; } } @@ -1080,7 +1080,7 @@ IsValidDnsResponse ( NET_LIST_FOR_EACH (Entry, &TokensMap->Used) { *Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link); Packet = (NET_BUF *) ((*Item)->Value); - if (Packet == NULL){ + if (Packet == NULL) { continue; } else { @@ -2127,7 +2127,7 @@ DnsOnTimerRetransmit ( } } } - }else { + } else { // // Iterate through all the children of the DNS service instance. Time // out the packet. If maximum retries reached, clean the Token up. diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c index 4acc5fca46cf..a0bb58ef1db3 100644 --- a/NetworkPkg/DnsDxe/DnsProtocol.c +++ b/NetworkPkg/DnsDxe/DnsProtocol.c @@ -217,7 +217,7 @@ Dns4Configure ( Dns4InstanceCancelToken(Instance, NULL); } - if (Instance->UdpIo != NULL){ + if (Instance->UdpIo != NULL) { UdpIoCleanIo (Instance->UdpIo); } @@ -1061,7 +1061,7 @@ Dns6Configure ( Dns6InstanceCancelToken(Instance, NULL); } - if (Instance->UdpIo != NULL){ + if (Instance->UdpIo != NULL) { UdpIoCleanIo (Instance->UdpIo); } -- 2.20.1.windows.1