]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove redundant IsUnicodeFiFoEmpty ()in UnicodeFiFoRemoveOneKey().
authorElvin Li <elvin.li@intel.com>
Tue, 11 Feb 2014 00:13:50 +0000 (00:13 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Feb 2014 00:13:50 +0000 (00:13 +0000)
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

MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c

index 5269995d1d0dc03c23f83ff2a8232afef8ff3c46..9806e1f0966c585c7e10a2e37c4a930c6715ddf9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for Terminal driver.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1013,15 +1013,14 @@ UnicodeFiFoInsertOneKey (
 \r
 /**\r
   Remove one pre-fetched key out of the Unicode FIFO buffer.\r
+  The caller should guarantee that Unicode FIFO buffer is not empty \r
+  by IsUnicodeFiFoEmpty ().\r
 \r
   @param  TerminalDevice       Terminal driver private structure.\r
   @param  Output               The key will be removed.\r
 \r
-  @retval TRUE                 If insert successfully.\r
-  @retval FLASE                If Unicode FIFO buffer is empty before remove operation.\r
-\r
 **/\r
-BOOLEAN\r
+VOID\r
 UnicodeFiFoRemoveOneKey (\r
   TERMINAL_DEV  *TerminalDevice,\r
   UINT16        *Output\r
index d95b1237a1509e46d383a8b1fc2da931c5572fe7..118086176dd3686313d2001c1108def95a534c45 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -942,15 +942,14 @@ UnicodeFiFoInsertOneKey (
 \r
 /**\r
   Remove one pre-fetched key out of the Unicode FIFO buffer.\r
+  The caller should guarantee that Unicode FIFO buffer is not empty \r
+  by IsUnicodeFiFoEmpty ().\r
 \r
   @param  TerminalDevice       Terminal driver private structure.\r
   @param  Output               The key will be removed.\r
 \r
-  @retval TRUE                 If insert successfully.\r
-  @retval FLASE                If Unicode FIFO buffer is empty before remove operation.\r
-\r
 **/\r
-BOOLEAN\r
+VOID\r
 UnicodeFiFoRemoveOneKey (\r
   TERMINAL_DEV  *TerminalDevice,\r
   UINT16        *Output\r
@@ -961,19 +960,9 @@ UnicodeFiFoRemoveOneKey (
   Head = TerminalDevice->UnicodeFiFo->Head;\r
   ASSERT (Head < FIFO_MAX_NUMBER + 1);\r
 \r
-  if (IsUnicodeFiFoEmpty (TerminalDevice)) {\r
-    //\r
-    //  FIFO is empty\r
-    //\r
-    Output = NULL;\r
-    return FALSE;\r
-  }\r
-\r
   *Output = TerminalDevice->UnicodeFiFo->Data[Head];\r
 \r
   TerminalDevice->UnicodeFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));\r
-\r
-  return TRUE;\r
 }\r
 \r
 /**\r