summaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/earray.cpp6
-rw-r--r--src/kernel/lib/earray.h2
2 files changed, 3 insertions, 5 deletions
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 <mem/mem.h>
#include <core/sys.h>
#include <lib/cpp.h>
@@ -101,7 +99,7 @@ T *earray<T>::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<T>::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 <earray.cpp>
#endif