robustify task and sds initialization
[mTask.git] / int / task.c
index 3b5690a..47c5bd1 100644 (file)
@@ -6,9 +6,14 @@
 #include "misc.h"
 #include "task.h"
 
-struct task tasks[MAXTASKS];// = {0};
+struct task tasks[MAXTASKS];
 uint8_t c;
 
+void task_init()
+{
+       memset(&tasks, 0, sizeof(struct task)*MAXTASKS);
+}
+
 int task_register(int fd)
 {
        uint8_t ct;