public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout
@ 2017-12-25  2:45 fanwang2
  2017-12-25  5:48 ` Bi, Dandan
  0 siblings, 1 reply; 2+ messages in thread
From: fanwang2 @ 2017-12-25  2:45 UTC (permalink / raw)
  To: edk2-devel; +Cc: Wang Fan, Dandan Bi

From: Wang Fan <fan.wang@intel.com>

Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
---
 MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index d75cca2..26a80a7 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -2526,11 +2526,10 @@ Exit:
                                 MediaState pointer is NULL.
   @retval EFI_DEVICE_ERROR      A device error occurred.
   @retval EFI_TIMEOUT           Network is connecting but timeout.
 
 **/
-
 EFI_STATUS
 EFIAPI
 NetLibDetectMediaWaitTimeout (
   IN  EFI_HANDLE            ServiceHandle,
   IN  UINT64                Timeout,
@@ -2571,11 +2570,11 @@ NetLibDetectMediaWaitTimeout (
   if (EFI_ERROR (Status)) {
 
     MediaPresent = TRUE;
     Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
     if (!EFI_ERROR (Status)) {
-      if (MediaPresent == TRUE) {
+      if (MediaPresent) {
         *MediaState = EFI_SUCCESS;
       } else {
         *MediaState = EFI_NO_MEDIA;
       }
     }
@@ -2612,11 +2611,11 @@ NetLibDetectMediaWaitTimeout (
       // If gEfiAdapterInfoMediaStateGuid is not supported, call NetLibDetectMedia to get media state!
       //
       MediaPresent = TRUE;
       Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
       if (!EFI_ERROR (Status)) {
-        if (MediaPresent == TRUE) {
+        if (MediaPresent) {
           *MediaState = EFI_SUCCESS;
         } else {
           *MediaState = EFI_NO_MEDIA;
         }
       }
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-25  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25  2:45 [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout fanwang2
2017-12-25  5:48 ` Bi, Dandan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox