From 7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 17 May 2012 13:30:09 +0200 Subject: Beginning of a VFS implemented. C++ is great. --- src/kernel/lib/earray.cpp | 6 ++---- src/kernel/lib/earray.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/kernel/lib') diff --git a/src/kernel/lib/earray.cpp b/src/kernel/lib/earray.cpp index 5760822..3a41f18 100644 --- a/src/kernel/lib/earray.cpp +++ b/src/kernel/lib/earray.cpp @@ -1,5 +1,3 @@ -#include "earray.h" - #include #include #include @@ -101,7 +99,7 @@ T *earray::at(int num) { mutex_unlock(&mutex); return 0; } - void* ret = data[i][j]; + T* ret = data[i][j]; mutex_unlock(&mutex); return ret; } @@ -145,7 +143,7 @@ void earray::set(int num, T* ptr) { } } } else { - if (data[a] = 0) { + if (data[a] == 0) { data[a] = (T**)kmalloc(vect_len * sizeof(T*)); for (i = 0; i < vect_len; i++) data[a][i] = 0; } diff --git a/src/kernel/lib/earray.h b/src/kernel/lib/earray.h index d3d7a9b..9a43612 100644 --- a/src/kernel/lib/earray.h +++ b/src/kernel/lib/earray.h @@ -32,6 +32,6 @@ struct earray { int count() { return elements; } }; - +#include #endif -- cgit v1.2.3