Skip to content

Commit

Permalink
preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Mar 26, 2024
1 parent 7a2122d commit dc1e7cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ void token_list_pop_back(struct token_list* list) /*unchecked*/
return;

struct token* p = list->tail;
assert(p->next == NULL);
if (list->head == list->tail)
{
list->head = NULL;
Expand All @@ -1106,15 +1107,15 @@ void token_list_pop_front(struct token_list* list) /*unchecked*/
return;

struct token* owner p = list->head;

assert(p->prev == NULL);
if (list->head == list->tail)
{
list->head = NULL;
list->tail = NULL;
}
else
{
list->head = list->head->next;
list->head = p->next;
}
p->next = NULL;
p->prev = NULL;
Expand Down Expand Up @@ -36404,7 +36405,7 @@ static void flow_visit_expression(struct flow_visit_ctx* ctx, struct expression*
bool_source_zero_value = true;
}
}
#ifndef NEW_FLOW_ANALYSIS
#ifdef NEW_FLOW_ANALYSIS
object_assignment3(ctx->ctx,
p_expression->left->first_token,
ASSIGMENT_TYPE_OBJECTS,
Expand Down
5 changes: 3 additions & 2 deletions src/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void token_list_pop_back(struct token_list* list) /*unchecked*/
return;

struct token* p = list->tail;
assert(p->next == NULL);
if (list->head == list->tail)
{
list->head = NULL;
Expand All @@ -127,15 +128,15 @@ void token_list_pop_front(struct token_list* list) /*unchecked*/
return;

struct token* owner p = list->head;

assert(p->prev == NULL);
if (list->head == list->tail)
{
list->head = NULL;
list->tail = NULL;
}
else
{
list->head = list->head->next;
list->head = p->next;
}
p->next = NULL;
p->prev = NULL;
Expand Down

0 comments on commit dc1e7cd

Please sign in to comment.