From e4569a6ea3767c2d28079c7e695e3df9d068af39 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 22 Mar 2012 12:09:34 +0800 Subject: [PATCH] Kernel/RingBuffer - Fix spinlock not being zeroed --- KernelLand/Kernel/adt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.20.1