mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
这样是能用的, 先提交一波
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user