Skip to content

Commit

Permalink
gotcha
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhengli Wang committed Dec 15, 2022
1 parent c709f88 commit 6d12b36
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/clist.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 35,15 @@ struct clist *clist_init(size_t item_size)
{
// I am lazy.
struct clist *clist = (struct clist *)malloc(sizeof(struct clist));
clist->begin = NULL;
clist->current = NULL;
clist->end = NULL;
clist->current_index = 0;
clist->item_size = item_size;
clist->list_length = 0;
if (clist)
{
clist->begin = NULL;
clist->current = NULL;
clist->end = NULL;
clist->current_index = 0;
clist->item_size = item_size;
clist->list_length = 0;
}
return clist;
}

Expand Down

0 comments on commit 6d12b36

Please sign in to comment.