Skip to content

Commit

Permalink
Fix VLE peek stack
Browse files Browse the repository at this point in the history
Fix the VLE peek_stack_head routine to return a NULL if the stack
is NULL.
  • Loading branch information
jrgemignani committed Jun 29, 2022
1 parent a166df1 commit fae55d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backend/utils/adt/age_graphid_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ int64 get_stack_size(ListGraphId *stack)
return stack->size;
}

/* return a reference to the head entry in the stack */
/* return a reference to the head entry in the stack, or NULL if empty */
GraphIdNode *peek_stack_head(ListGraphId *stack)
{
if (stack == NULL)
{
return NULL;
}

return stack->head;
}

Expand Down

0 comments on commit fae55d2

Please sign in to comment.