Fixed hktask_add not comparing task names if there was only a single task.
This commit is contained in:
parent
1ff0756044
commit
1299cf6ac9
@ -116,9 +116,20 @@ HKTASK *task, *ptr;
|
||||
ptr = ptr->next;
|
||||
}
|
||||
if (ptr)
|
||||
{
|
||||
if (strcmp(ptr->name, name) == 0)
|
||||
{
|
||||
spinlock_release(&tasklock);
|
||||
free(task->name);
|
||||
free(task);
|
||||
return 0;
|
||||
}
|
||||
ptr->next = task;
|
||||
}
|
||||
else
|
||||
{
|
||||
tasks = task;
|
||||
}
|
||||
spinlock_release(&tasklock);
|
||||
|
||||
return task->nextdue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user