Reviewed-by: Dandan Bi
Thanks,
Dandan
-Original Message-
From: Wang, Fan
Sent: Monday, December 25, 2017 10:46 AM
To: edk2-devel@lists.01.org
Cc: Wang, Fan ; Bi, Dandan
Subject: [Patch] MdeModulePkg/NetLib: Refine coding style for API
NetLibDetectMediaWaitTimeout
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_HANDLEServiceHandle,
IN UINT64Timeout,
@@ -2571,11 +2570,11 @@ NetLibDetectMediaWaitTimeout (
if (EFI_ERROR (Status)) {
MediaPresent = TRUE;
Status = NetLibDetectMedia (ServiceHandle, );
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, );
if (!EFI_ERROR (Status)) {
-if (MediaPresent == TRUE) {
+if (MediaPresent) {
*MediaState = EFI_SUCCESS;
} else {
*MediaState = EFI_NO_MEDIA;
}
}
--
1.9.5.msysgit.1
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel