diff options
| author | Lou Berger <lberger@labn.net> | 2017-10-05 14:57:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-05 14:57:05 -0400 |
| commit | 76ae8092db11aa40198f71424103b484675d4d62 (patch) | |
| tree | 9f6095d8c4c99171f57189db8396870d9f2c9740 /lib/command_match.c | |
| parent | 9772d7297920b2c6947886488fa2b07ead8e8fe0 (diff) | |
| parent | acdf5e25101bafe334e6b500c3dd0a2babb3c1ec (diff) | |
Merge pull request #1264 from donaldsharp/linklist
Linklist api cleanup
Diffstat (limited to 'lib/command_match.c')
| -rw-r--r-- | lib/command_match.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/command_match.c b/lib/command_match.c index 6384abe5ce..c60373f910 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -333,7 +333,7 @@ static enum matcher_rv command_match_r(struct graph_node *start, vector vline, status = MATCHER_INCOMPLETE; // cleanup - list_delete(next); + list_delete_and_null(&next); return status; } @@ -366,7 +366,7 @@ enum matcher_rv command_complete(struct graph *graph, vector vline, unsigned int idx; for (idx = 0; idx < vector_active(vline) && next->count > 0; idx++) { - list_delete(current); + list_delete_and_null(¤t); current = next; next = list_new(); next->del = stack_del; @@ -457,8 +457,8 @@ enum matcher_rv command_complete(struct graph *graph, vector vline, } } - list_delete(current); - list_delete(next); + list_delete_and_null(¤t); + list_delete_and_null(&next); return mrv; } @@ -648,7 +648,7 @@ static void del_arglist(struct list *list) list_delete_node(list, tail); // delete the rest of the list as usual - list_delete(list); + list_delete_and_null(&list); } /*---------- token level matching functions ----------*/ |
