diff options
author | Ian Fan <[email protected]> | 2018-12-08 22:52:29 +0000 |
---|---|---|
committer | Ian Fan <[email protected]> | 2018-12-09 00:37:50 +0000 |
commit | 19e831ed3da2aba75d56e46c57967bcc60442d57 (patch) | |
tree | edaa5855087f9d6f257c5c6dcd5eda0c4cc55b02 /sway/config.c | |
parent | 0c3f0dfd16b73f659c4eddd42ae9467bfc25a19c (diff) |
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 'sway/config.c')
-rw-r--r-- | sway/config.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/config.c b/sway/config.c index ff7de4b9..efb95e31 100644 --- a/sway/config.c +++ b/sway/config.c @@ -654,8 +654,7 @@ bool read_config(FILE *file, struct sway_config *config, if (read + length > config_size) { wlr_log(WLR_ERROR, "Config file changed during reading"); - list_foreach(stack, free); - list_free(stack); + free_flat_list(stack); free(line); return false; } @@ -684,8 +683,7 @@ bool read_config(FILE *file, struct sway_config *config, } char *expanded = expand_line(block, line, brace_detected > 0); if (!expanded) { - list_foreach(stack, free); - list_free(stack); + free_flat_list(stack); free(line); return false; } @@ -750,8 +748,7 @@ bool read_config(FILE *file, struct sway_config *config, free(line); free_cmd_results(res); } - list_foreach(stack, free); - list_free(stack); + free_flat_list(stack); config->current_config_line_number = 0; config->current_config_line = NULL; |