summaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-07-13 08:17:45 +1000
committerGitHub <[email protected]>2018-07-13 08:17:45 +1000
commit53133fdefb1cdd97d21b3d5424868b70642d46dc (patch)
tree21c8d74ed97be81ed731f92443a4cd726ee8ac4b /sway/config.c
parent9b16227ec3cfc648f177f186d29b9f0002b7bbde (diff)
parentda8149c066c8bd3fe662337159081600a93950f7 (diff)
Merge branch 'master' into xwayland-floating-borders
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/config.c b/sway/config.c
index c59f4f0d..d2386f46 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -560,7 +560,7 @@ static char *expand_line(const char *block, const char *line, bool add_brace) {
bool read_config(FILE *file, struct sway_config *config) {
bool reading_main_config = false;
- char *current_config, *config_pos;
+ char *this_config = NULL, *config_pos;
long config_size = 0;
if (config->current_config == NULL) {
reading_main_config = true;
@@ -569,8 +569,8 @@ bool read_config(FILE *file, struct sway_config *config) {
config_size = ftell(file);
rewind(file);
- config_pos = current_config = malloc(config_size + 1);
- if (current_config == NULL) {
+ config_pos = this_config = malloc(config_size + 1);
+ if (this_config == NULL) {
wlr_log(WLR_ERROR, "Unable to allocate buffer for config contents");
return false;
}
@@ -616,7 +616,7 @@ bool read_config(FILE *file, struct sway_config *config) {
list_foreach(stack, free);
list_free(stack);
free(line);
- free(current_config);
+ free(this_config);
return false;
}
wlr_log(WLR_DEBUG, "Expanded line: %s", expanded);
@@ -678,8 +678,8 @@ bool read_config(FILE *file, struct sway_config *config) {
list_free(stack);
if (reading_main_config) {
- current_config[config_size - 1] = '\0';
- config->current_config = current_config;
+ this_config[config_size - 1] = '\0';
+ config->current_config = this_config;
}
return success;
}