Kernel/RingBuffer - Fix spinlock not being zeroed
authorJohn Hodge <[email protected]>
Thu, 22 Mar 2012 04:09:34 +0000 (12:09 +0800)
committerJohn Hodge <[email protected]>
Thu, 22 Mar 2012 04:09:34 +0000 (12:09 +0800)
KernelLand/Kernel/adt.c

index ef2ae05..9d1a96e 100644 (file)
@@ -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;
 }

UCC git Repository :: git.ucc.asn.au