diff options
author | Elvin Li <elvin.li@intel.com> | 2014-02-11 00:13:50 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-02-11 00:13:50 +0000 |
commit | b80eed7d6d94090bd5b9ddb9720d473b855d20cc (patch) | |
tree | 2bc9e86ef2ebf1a13e74da54d065ca4d8822f161 | |
parent | 52f8e370ac06543a21258a61ace0e004d589af5b (diff) | |
download | edk2-b80eed7d6d94090bd5b9ddb9720d473b855d20cc.zip edk2-b80eed7d6d94090bd5b9ddb9720d473b855d20cc.tar.gz edk2-b80eed7d6d94090bd5b9ddb9720d473b855d20cc.tar.bz2 |
Remove redundant IsUnicodeFiFoEmpty ()in UnicodeFiFoRemoveOneKey().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15216 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h | 9 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 19 |
2 files changed, 8 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index 5269995..9806e1f 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -1,7 +1,7 @@ /** @file
Header file for Terminal driver.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1013,15 +1013,14 @@ UnicodeFiFoInsertOneKey ( /**
Remove one pre-fetched key out of the Unicode FIFO buffer.
+ The caller should guarantee that Unicode FIFO buffer is not empty
+ by IsUnicodeFiFoEmpty ().
@param TerminalDevice Terminal driver private structure.
@param Output The key will be removed.
- @retval TRUE If insert successfully.
- @retval FLASE If Unicode FIFO buffer is empty before remove operation.
-
**/
-BOOLEAN
+VOID
UnicodeFiFoRemoveOneKey (
TERMINAL_DEV *TerminalDevice,
UINT16 *Output
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index d95b123..1180861 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1,7 +1,7 @@ /** @file
Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -942,15 +942,14 @@ UnicodeFiFoInsertOneKey ( /**
Remove one pre-fetched key out of the Unicode FIFO buffer.
+ The caller should guarantee that Unicode FIFO buffer is not empty
+ by IsUnicodeFiFoEmpty ().
@param TerminalDevice Terminal driver private structure.
@param Output The key will be removed.
- @retval TRUE If insert successfully.
- @retval FLASE If Unicode FIFO buffer is empty before remove operation.
-
**/
-BOOLEAN
+VOID
UnicodeFiFoRemoveOneKey (
TERMINAL_DEV *TerminalDevice,
UINT16 *Output
@@ -961,19 +960,9 @@ UnicodeFiFoRemoveOneKey ( Head = TerminalDevice->UnicodeFiFo->Head;
ASSERT (Head < FIFO_MAX_NUMBER + 1);
- if (IsUnicodeFiFoEmpty (TerminalDevice)) {
- //
- // FIFO is empty
- //
- Output = NULL;
- return FALSE;
- }
-
*Output = TerminalDevice->UnicodeFiFo->Data[Head];
TerminalDevice->UnicodeFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));
-
- return TRUE;
}
/**
|