diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:15:26 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:15:26 +0200 |
commit | beb8eac93c9a38c417db4ae77430af5568e54f1c (patch) | |
tree | 1b95fb18c531342b3eb88a47c8069bf3e08826a6 /xen/include/acpi | |
parent | 148ed3108078b354f4c7620c495e300d54ec2724 (diff) | |
download | xen-beb8eac93c9a38c417db4ae77430af5568e54f1c.tar.gz xen-beb8eac93c9a38c417db4ae77430af5568e54f1c.tar.bz2 xen-beb8eac93c9a38c417db4ae77430af5568e54f1c.zip |
introduce xzalloc() & Co
Rather than having to match a call to one of the xmalloc() flavors with
a subsequent memset(), introduce a zeroing variant of each of those
flavors.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/acpi')
-rw-r--r-- | xen/include/acpi/platform/aclinux.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/xen/include/acpi/platform/aclinux.h b/xen/include/acpi/platform/aclinux.h index 805d8e57d1..daa2d7e985 100644 --- a/xen/include/acpi/platform/aclinux.h +++ b/xen/include/acpi/platform/aclinux.h @@ -77,10 +77,7 @@ #define acpi_thread_id struct vcpu * #define ACPI_ALLOCATE(a) xmalloc_bytes(a) -#define ACPI_ALLOCATE_ZEROED(a) ({ \ - void *p = xmalloc_bytes(a); \ - if ( p ) memset(p, 0, a); \ - p; }) +#define ACPI_ALLOCATE_ZEROED(a) xzalloc_bytes(a) #define ACPI_FREE(a) xfree(a) #endif /* __ACLINUX_H__ */ |