diff options
author | Feng Tian <feng.tian@intel.com> | 2014-08-07 08:54:34 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-07 08:54:34 +0000 |
commit | 6e1e5405544724406f07344a5911298c3df44129 (patch) | |
tree | 1f723606676a8f4fef5ac4aac1682c171ce21381 /MdeModulePkg/Library/BaseSerialPortLib16550 | |
parent | e935092fa7e1401201e6faadb04b0ae239dd97a5 (diff) | |
download | edk2-6e1e5405544724406f07344a5911298c3df44129.tar.gz edk2-6e1e5405544724406f07344a5911298c3df44129.tar.bz2 edk2-6e1e5405544724406f07344a5911298c3df44129.zip |
1) Add type cast for better coding style.
2) replace StrCpy() usage in Variable driver with StrnCpy().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15770 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/BaseSerialPortLib16550')
-rw-r--r-- | MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c index fd20e1c258..2fc6031ab7 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -1,7 +1,7 @@ /** @file
16550 UART Serial Port library functions
- 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
@@ -177,7 +177,7 @@ SerialPortInitialize ( }
SerialPortWriteRegister (R_UART_LCR, (UINT8)(SerialPortReadRegister (R_UART_LCR) | B_UART_LCR_DLAB));
Divisor = SerialPortReadRegister (R_UART_BAUD_HIGH) << 8;
- Divisor |= SerialPortReadRegister (R_UART_BAUD_LOW);
+ Divisor |= (UINTN)SerialPortReadRegister (R_UART_BAUD_LOW);
SerialPortWriteRegister (R_UART_LCR, (UINT8)(SerialPortReadRegister (R_UART_LCR) & ~B_UART_LCR_DLAB));
if (Divisor != 115200 / PcdGet32 (PcdSerialBaudRate)) {
Initialized = FALSE;
|