diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/config.c b/sway/config.c index 8b6f7b6f..0aae1696 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -302,6 +302,11 @@ static char *get_config_path(void) { | |||
302 | const char *current_config_path; | 302 | const char *current_config_path; |
303 | 303 | ||
304 | static bool load_config(const char *path, struct sway_config *config) { | 304 | static bool load_config(const char *path, struct sway_config *config) { |
305 | if (path == NULL) { | ||
306 | wlr_log(L_ERROR, "Unable to find a config file!"); | ||
307 | return false; | ||
308 | } | ||
309 | |||
305 | wlr_log(L_INFO, "Loading config from %s", path); | 310 | wlr_log(L_INFO, "Loading config from %s", path); |
306 | current_config_path = path; | 311 | current_config_path = path; |
307 | 312 | ||
@@ -310,11 +315,6 @@ static bool load_config(const char *path, struct sway_config *config) { | |||
310 | return false; | 315 | return false; |
311 | } | 316 | } |
312 | 317 | ||
313 | if (path == NULL) { | ||
314 | wlr_log(L_ERROR, "Unable to find a config file!"); | ||
315 | return false; | ||
316 | } | ||
317 | |||
318 | FILE *f = fopen(path, "r"); | 318 | FILE *f = fopen(path, "r"); |
319 | if (!f) { | 319 | if (!f) { |
320 | wlr_log(L_ERROR, "Unable to open %s for reading", path); | 320 | wlr_log(L_ERROR, "Unable to open %s for reading", path); |