Skip to content

Commit

Permalink
Use os_allocate_zeroed
Browse files Browse the repository at this point in the history
Eliminates an unnecessary memset.
Change proposed by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
  • Loading branch information
acpibob committed Jun 20, 2016
1 parent f39a732 commit 2b896c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/components/utilities/uttrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,12 @@ AcpiUtCreateList (
ACPI_MEMORY_LIST *Cache;


Cache = AcpiOsAllocate (sizeof (ACPI_MEMORY_LIST));
Cache = AcpiOsAllocateZeroed (sizeof (ACPI_MEMORY_LIST));
if (!Cache)
{
return (AE_NO_MEMORY);
}

memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));

Cache->ListName = ListName;
Cache->ObjectSize = ObjectSize;

Expand Down

0 comments on commit 2b896c5

Please sign in to comment.