Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield committed Sep 1, 2024
1 parent fd89209 commit 70d0691
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void destroy_node(struct list *l, struct list_node *node)

int is_empty_list(const struct list *l)
{
return (l->count == 0 ? TRUE : FALSE);
return l->count == 0;
}

int get_list_count(const struct list *l)
Expand Down
5 changes: 0 additions & 5 deletions src/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@

#define __LIST__

#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif

struct list_node
{
/* pointer to the content of the node */
Expand Down

0 comments on commit 70d0691

Please sign in to comment.