public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: fanwang2 <fan.wang@intel.com>
To: edk2-devel@lists.01.org
Cc: Wang Fan <fan.wang@intel.com>, Dandan Bi <dandan.bi@intel.com>
Subject: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout
Date: Mon, 25 Dec 2017 10:45:46 +0800	[thread overview]
Message-ID: <1514169946-6992-1-git-send-email-fan.wang@intel.com> (raw)

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



             reply	other threads:[~2017-12-25  2:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-25  2:45 fanwang2 [this message]
2017-12-25  5:48 ` [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout Bi, Dandan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514169946-6992-1-git-send-email-fan.wang@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox