aboutsummaryrefslogtreecommitdiff
path: root/kernel/features
diff options
context:
space:
mode:
authorMarvin Borner2020-08-30 09:59:03 +0200
committerMarvin Borner2020-08-30 09:59:03 +0200
commitf73592503981eaacf1836f0d0049bed2f989212e (patch)
treeb10ec58e932a94022c36fe6e1de2b7bbc20fc838 /kernel/features
parente15051fd2d1d65af315ac4004256d5bc56a6dc67 (diff)
Added kernel testing suit
Diffstat (limited to 'kernel/features')
-rw-r--r--kernel/features/event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/features/event.c b/kernel/features/event.c
index 5436ef5..71c0ad9 100644
--- a/kernel/features/event.c
+++ b/kernel/features/event.c
@@ -29,14 +29,14 @@ void event_unregister(enum message_type id, struct proc *proc)
{
assert(id < sizeof(event_table) / sizeof(*event_table));
- struct event_descriptor *desc = malloc(sizeof(*desc));
- desc->id = id;
- desc->proc = proc;
+ struct event_descriptor desc;
+ desc.id = id;
+ desc.proc = proc;
struct node *iterator = event_table[id]->head;
do {
struct event_descriptor *desc_comp = iterator->data;
- if (desc_comp->id == desc->id && desc_comp->proc == desc->proc)
+ if (desc_comp->id == desc.id && desc_comp->proc == desc.proc)
list_remove(event_table[id], iterator);
} while ((iterator = iterator->next) != NULL);
}