这样是能用的, 先提交一波

This commit is contained in:
zogodo
2019-12-26 21:49:57 +08:00
parent 764cfcfd94
commit 08b4dc8c35
5 changed files with 10 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<time.h>
#include"timed_task/timed_task.h"
pTimedTask task_top = NULL;
@@ -65,6 +66,7 @@ bool DelTask(int time)
pTimedTask tmp = task_top;
task_top = task_top->next;
free(tmp);
task_count--;
return true;
}
else if (task_top->next == NULL)
@@ -80,6 +82,8 @@ bool DelTask(int time)
{
pre_tsk->next = tmp_tsk->next;
free(tmp_tsk);
task_count--;
return true;
}
tmp_tsk = tmp_tsk->next;
}