From: John Hodge Date: Thu, 22 Mar 2012 04:09:34 +0000 (+0800) Subject: Kernel/RingBuffer - Fix spinlock not being zeroed X-Git-Tag: rel0.15~723 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e4569a6ea3767c2d28079c7e695e3df9d068af39;p=tpg%2Facess2.git Kernel/RingBuffer - Fix spinlock not being zeroed --- diff --git a/KernelLand/Kernel/adt.c b/KernelLand/Kernel/adt.c index ef2ae058..9d1a96e1 100644 --- a/KernelLand/Kernel/adt.c +++ b/KernelLand/Kernel/adt.c @@ -12,9 +12,7 @@ // --- Ring Buffers --- tRingBuffer *RingBuffer_Create(size_t Space) { - tRingBuffer *ret = malloc(sizeof(tRingBuffer)+Space); - ret->Start = 0; - ret->Length = 0; + tRingBuffer *ret = calloc(1, sizeof(tRingBuffer)+Space); ret->Space = Space; return ret; }