]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/ScanMem8Wrapper.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseMemoryLib / ScanMem8Wrapper.c
CommitLineData
3eb9473e 1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 ScanMem8Wrapper.c\r
15 \r
16Abstract: \r
17\r
18 ScanMem8() implementation.\r
19\r
20--*/\r
21\r
22#include "BaseMemoryLibInternal.h"\r
23\r
24/**\r
25 Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value\r
26 in the target buffer.\r
27\r
28 This function searches target the buffer specified by Buffer and Length from the lowest\r
29 address to the highest address for an 8-bit value that matches Value. If a match is found,\r
30 then a pointer to the matching byte in the target buffer is returned. If no match is found,\r
31 then NULL is returned. If Length is 0, then NULL is returned.\r
32 If Length > 0 and Buffer is NULL, then ASSERT().\r
33 If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
34\r
35 @param Buffer Pointer to the target buffer to scan.\r
36 @param Length Number of bytes in Buffer to scan.\r
37 @param Value Value to search for in the target buffer.\r
38\r
39 @return A pointer to the matching byte in the target buffer or NULL otherwise.\r
40\r
41**/\r
42VOID *\r
43EFIAPI\r
44ScanMem8 (\r
45 IN CONST VOID *Buffer,\r
46 IN UINTN Length,\r
47 IN UINT8 Value\r
48 )\r
49{\r
50 if (Length == 0) {\r
51 return NULL;\r
52 }\r
53 ASSERT (Buffer != NULL);\r
54 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
55 \r
56 return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);\r
57}\r