]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
remove unnecessary check for NULL pointer.
[mirror_edk2.git] / EdkModulePkg / Universal / FirmwareVolume / GuidedSectionExtraction / Crc32SectionExtract / Dxe / GuidedSection.c
CommitLineData
878ddf1f 1/*++\r
2\r
8d8daecb 3Copyright (c) 2006 - 2007, Intel Corporation \r
878ddf1f 4All rights reserved. This program and the accompanying materials \r
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 GuidedSection.c\r
15 \r
16Abstract:\r
17\r
18 GUIDed section extraction protocol implementation. \r
19 This contains the common constructor of GUIDed section\r
20 extraction protocol. GUID specific implementation of each\r
21 GUIDed section extraction protocol can be found in other\r
22 files under the same directory.\r
878ddf1f 23 \r
24--*/\r
25\r
963cbacb 26#include "GuidedSection.h"\r
878ddf1f 27\r
28EFI_STATUS\r
29GuidedSectionExtractionProtocolConstructor (\r
30 OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,\r
31 IN EFI_EXTRACT_GUIDED_SECTION ExtractSection\r
32 )\r
33/*++\r
34\r
35Routine Description:\r
36\r
37 Constructor for the GUIDed section extraction protocol. Initializes\r
38 instance data.\r
39\r
40Arguments:\r
41\r
42 This Instance to construct\r
43\r
44Returns:\r
45\r
46 EFI_SUCCESS: Instance initialized.\r
47\r
48--*/\r
49// TODO: GuidedSep - add argument and description to function comment\r
50// TODO: ExtractSection - add argument and description to function comment\r
51// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment\r
52{\r
8d8daecb
LG
53 *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));\r
54 if (*GuidedSep == NULL) {\r
878ddf1f 55 return EFI_OUT_OF_RESOURCES;\r
56 }\r
57\r
58 (*GuidedSep)->ExtractSection = ExtractSection;\r
59\r
60 return EFI_SUCCESS;\r
61}\r