diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 14:57:20 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 14:57:20 +0100 |
commit | de305d5345d909ca4c5e484791108681bc99842c (patch) | |
tree | 28731d2a0ee6f80ad8da24e763470179e730f5b0 | |
parent | initialise display server connections (diff) | |
download | radharc-de305d5345d909ca4c5e484791108681bc99842c.tar.gz radharc-de305d5345d909ca4c5e484791108681bc99842c.tar.bz2 radharc-de305d5345d909ca4c5e484791108681bc99842c.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/state.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/state.c b/src/state.c index a3219fa..72fbb59 100644 --- a/src/state.c +++ b/src/state.c @@ -254,7 +254,9 @@ get_clut_method(const char *display) int initialise_clut(const struct settings *settings) { - int method, error = 0, is_none = 0; +#define NONE_METHOD (method == INT_MAX) + + int method = 0, error = 0, is_none = 0; const char *sitename_; char *sitename = NULL; void *new; @@ -267,8 +269,7 @@ initialise_clut(const struct settings *settings) switch (settings->monitors_arg[i]) { case 'd': t ((method = get_clut_method(sitename_ = settings->monitors_id[i])) < 0); - if ((is_none = (method == INT_MAX))) - break; + if (NONE_METHOD) break; sitename_ = strchr(sitename_, '='); if (sitename_) try ((sitename = strdup(sitename_ + 1))); t ((error = libgamma_site_initialise(sites + sites_n, method, sitename))); @@ -277,11 +278,13 @@ initialise_clut(const struct settings *settings) break; case 'm': - ;/* TODO -m */ + if (NONE_METHOD) break; + /* TODO -m */ break; case 'e': - ;/* TODO -e */ + if (NONE_METHOD) break; + /* TODO -e */ break; } } |