From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=fan.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DBAA921CB87B3 for ; Sun, 24 Dec 2017 18:41:01 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2017 18:45:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,453,1508828400"; d="scan'208";a="161538242" Received: from fanwang2-hp.ccr.corp.intel.com ([10.239.9.33]) by orsmga004.jf.intel.com with ESMTP; 24 Dec 2017 18:45:53 -0800 From: fanwang2 To: edk2-devel@lists.01.org Cc: Wang Fan , Dandan Bi Date: Mon, 25 Dec 2017 10:45:46 +0800 Message-Id: <1514169946-6992-1-git-send-email-fan.wang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 02:41:02 -0000 From: Wang Fan Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan --- 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