summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-04-01 08:21:03 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-04-01 14:52:12 +0800
commite2d662c3135a5d420d6050f42e969e78f6bb19f1 (patch)
treeef72ec68749f43223d253d764cdcfe52a75fc5fd /MdeModulePkg
parentbc7d95c00d9682ca96d8cee9a0be929c2e61a299 (diff)
downloadedk2-platforms-e2d662c3135a5d420d6050f42e969e78f6bb19f1.tar.xz
MdeModulePkg/DxeHttpLib: Avoid the pointless comparison of UINTN with zero
UINTN is unsigned integer, so it's pointless to compare it with zero. Cc: Bi Dandan <dandan.bi@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c2
-rw-r--r--MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index 8e29213a4f..8421caaa70 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -736,7 +736,7 @@ HttpUrlGetPort (
Status = AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, &Data);
- if (Data > HTTP_URI_PORT_MAX_NUM || Data < HTTP_URI_PORT_MIN_NUM) {
+ if (Data > HTTP_URI_PORT_MAX_NUM) {
return EFI_INVALID_PARAMETER;
}
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.h b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.h
index 5ee0fdc619..af82c16fc3 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.h
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.h
@@ -50,7 +50,6 @@ Header file for HttpLib.
#define HTTP_URI_FIELD_PORT 7
#define HTTP_URI_FIELD_MAX 8
-#define HTTP_URI_PORT_MIN_NUM 0
#define HTTP_URI_PORT_MAX_NUM 65535
//