> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 16:21:58 up 1 day, 15:12, 1 user, load average: 0.38, 0.31, 0.18
This commit is contained in:
@ -61,11 +61,11 @@ bool wp_check_hit(void) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static WP* del_wp(WP* head, WP* pos) {
|
||||
for (WP** i = &head; (*i) != NULL && (*i)->next != NULL; i = (WP**)*i) {
|
||||
static WP* del_wp(WP** head, WP* pos) {
|
||||
for (WP** i = head; (*i) != NULL && (*i)->next != NULL; i = (WP**)*i) {
|
||||
if ((**i).NO == pos->NO) {
|
||||
WP* res = *i;
|
||||
*i = (**i).next;
|
||||
*i = (*i)->next;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@ -87,7 +87,7 @@ WP* new_wp(char* _expr, int len) {
|
||||
if (!success) {
|
||||
return NULL;
|
||||
}
|
||||
WP* wp = del_wp(free_, free_);
|
||||
WP* wp = del_wp(&free_, free_);
|
||||
if (wp == NULL) {
|
||||
assert(0);
|
||||
}
|
||||
@ -108,7 +108,7 @@ WP* get_wp(int NO) {
|
||||
}
|
||||
|
||||
void free_wp(WP *_wp) {
|
||||
WP* wp = del_wp(head, _wp);
|
||||
WP* wp = del_wp(&head, _wp);
|
||||
wp->next = free_;
|
||||
free_ = wp;
|
||||
wp->expr[0] = '\0';
|
||||
|
Reference in New Issue
Block a user