From 523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 26 Jun 2014 03:24:25 +0000 Subject: Refine code to make it more safely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/SnpDxe/Snp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Universal/Network/SnpDxe') diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c index ed583b4888..ff93167767 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c @@ -1,7 +1,7 @@ /** @file Implementation of driver entry point and driver binding protocol. -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
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 @@ -545,8 +545,8 @@ SimpleNetworkDriverStart ( // the IO BAR. Save the index of the BAR into the adapter info structure. // for regular 32bit BARs, 0 is memory mapped, 1 is io mapped // - ConfigHeader = (PCI_TYPE00 *) &ConfigInfo.Config.Byte[0]; - TempBar = (UINT32 *) &ConfigHeader->Device.Bar[0]; + ConfigHeader = (PCI_TYPE00 *) ConfigInfo.Config.Byte; + TempBar = (UINT32 *) ConfigHeader->Device.Bar; for (BarIndex = 0; BarIndex <= 5; BarIndex++) { if ((*TempBar & PCI_BAR_MEM_MASK) == PCI_BAR_MEM_64BIT) { // -- cgit v1.2.3