diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-12-08 22:52:29 +0000 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-12-09 00:37:50 +0000 |
commit | 19e831ed3da2aba75d56e46c57967bcc60442d57 (patch) | |
tree | edaa5855087f9d6f257c5c6dcd5eda0c4cc55b02 /common/stringop.c | |
parent | Merge pull request #3260 from RedSoxFan/split-flatten (diff) | |
download | sway-19e831ed3da2aba75d56e46c57967bcc60442d57.tar.gz sway-19e831ed3da2aba75d56e46c57967bcc60442d57.tar.zst sway-19e831ed3da2aba75d56e46c57967bcc60442d57.zip |
list.c: Remove list_foreach
Most occurrences have been replaced by `free_flat_list` which has been
moved from stringop.c to list.c. The rest have been replaced by for loops.
Diffstat (limited to 'common/stringop.c')
-rw-r--r-- | common/stringop.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/common/stringop.c b/common/stringop.c index df016e9d..4b8c9a38 100644 --- a/common/stringop.c +++ b/common/stringop.c | |||
@@ -97,14 +97,6 @@ list_t *split_string(const char *str, const char *delims) { | |||
97 | return res; | 97 | return res; |
98 | } | 98 | } |
99 | 99 | ||
100 | void free_flat_list(list_t *list) { | ||
101 | int i; | ||
102 | for (i = 0; i < list->length; ++i) { | ||
103 | free(list->items[i]); | ||
104 | } | ||
105 | list_free(list); | ||
106 | } | ||
107 | |||
108 | char **split_args(const char *start, int *argc) { | 100 | char **split_args(const char *start, int *argc) { |
109 | *argc = 0; | 101 | *argc = 0; |
110 | int alloc = 2; | 102 | int alloc = 2; |