diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:18:30 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:18:30 +0200 |
commit | 1527de3f85fa0c94578fdd12792588e0825ef2eb (patch) | |
tree | dd39a33980d9c79ffbd93afc7fe3aa71e990c1df /xen/arch/x86/hpet.c | |
parent | 91f47f155288b0116472a7ce64d8709f144a5357 (diff) | |
download | xen-1527de3f85fa0c94578fdd12792588e0825ef2eb.tar.gz xen-1527de3f85fa0c94578fdd12792588e0825ef2eb.tar.bz2 xen-1527de3f85fa0c94578fdd12792588e0825ef2eb.zip |
use xzalloc in x86 code
This includes the removal of a redundant memset() from microcode_amd.c.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hpet.c')
-rw-r--r-- | xen/arch/x86/hpet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 508bb4ae51..3a2b80181f 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -365,10 +365,9 @@ static void __init hpet_fsb_cap_lookup(void) num_chs = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT); num_chs++; /* Value read out starts from 0 */ - hpet_events = xmalloc_array(struct hpet_event_channel, num_chs); + hpet_events = xzalloc_array(struct hpet_event_channel, num_chs); if ( !hpet_events ) return; - memset(hpet_events, 0, num_chs * sizeof(*hpet_events)); for ( i = 0; i < num_chs; i++ ) { @@ -504,10 +503,9 @@ void __init hpet_broadcast_init(void) return; if ( !hpet_events ) - hpet_events = xmalloc(struct hpet_event_channel); + hpet_events = xzalloc(struct hpet_event_channel); if ( !hpet_events ) return; - memset(hpet_events, 0, sizeof(*hpet_events)); hpet_events->irq = -1; /* Start HPET legacy interrupts */ |