diff options
Diffstat (limited to 'src/config-ini.c')
-rw-r--r-- | src/config-ini.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config-ini.c b/src/config-ini.c index 1a78903..015668f 100644 --- a/src/config-ini.c +++ b/src/config-ini.c @@ -1,4 +1,5 @@ -/* redshift-ng - Automatically adjust display colour temperature according the Sun +/*- + * redshift-ng - Automatically adjust display colour temperature according the Sun * * Copyright (c) 2009-2018 Jon Lund Steffensen <jonlst@gmail.com> * Copyright (c) 2014-2016, 2025 Mattias Andrée <m@maandree.se> @@ -27,7 +28,7 @@ static const struct env_path paths[] = { {0, "XDG_CONFIG_HOME", "/redshift-ng/redshift.conf"}, {0, "XDG_CONFIG_HOME", "/redshift/redshift.conf"}, {0, "XDG_CONFIG_HOME", "/redshift.conf"}, -#ifdef WINDOWS +#if defined(WINDOWS) {0, "localappdata", "/redshift-ng/redshift.conf"}, {0, "localappdata", "/redshift/redshift.conf"}, {0, "localappdata", "/redshift.conf"}, @@ -43,9 +44,11 @@ static const struct env_path paths[] = { {1, "XDG_CONFIG_DIRS", "/redshift-ng/redshift.conf"}, {1, "XDG_CONFIG_DIRS", "/redshift/redshift.conf"}, {1, "XDG_CONFIG_DIRS", "/redshift.conf"}, +#if !defined(WINDOWS) {0, "", "/etc/redshift-ng/redshift.conf"}, {0, "", "/etc/redshift/redshift.conf"}, {0, "", "/etc/redshift.conf"} +#endif }; @@ -95,7 +98,7 @@ config_ini_init(struct config_ini_state *state, const char *path) char *line = NULL, *s, *p, *value, *end, *pathbuf; char *next_line = NULL, *name; size_t size = 0; - ssize_t len; + ssize_t len = 0; /* initialised to silence false warning from clang */ FILE *f; state->sections = NULL; |