]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c
Fix a bug for vlan ping failure.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiExtScsiPassThru.c
index 0b55f04a46b9ff75cccc06bd330438847483c20d..dea7f7cb9585c750450c4932f980f38d7d005d29 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   The IScsi's EFI_EXT_SCSI_PASS_THRU_PROTOCOL driver.\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2007, 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -183,7 +183,7 @@ IScsiExtScsiPassThruBuildDevicePath (
   EFI_DEV_PATH                  *Node;\r
   UINTN                         DevPathNodeLen;\r
 \r
-  if ((DevicePath == NULL)) {\r
+  if (DevicePath == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -282,7 +282,8 @@ IScsiExtScsiPassThruGetTargetLun (
   Private       = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);\r
   ConfigNvData  = &Private->Session.ConfigData.NvData;\r
 \r
-  ZeroMem (*Target, TARGET_MAX_BYTES);\r
+  SetMem (*Target, TARGET_MAX_BYTES, 0xFF);\r
+  (*Target)[0] = 0;\r
 \r
   if (AsciiStrCmp (ConfigNvData->TargetName, (CHAR8 *) DevicePath + sizeof (ISCSI_DEVICE_PATH)) != 0) {\r
     return EFI_UNSUPPORTED;\r