diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2010-10-15 00:52:19 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2010-10-15 00:52:19 +0200 |
commit | 6f780c406336820ff1ea802a2f5361d96f851c96 (patch) | |
tree | cf0d325f3c3130547d542ff36ffcf66bb49b86a3 /src | |
parent | Add info on the neutral color temperature (6500K) in help output. (diff) | |
download | redshift-ng-6f780c406336820ff1ea802a2f5361d96f851c96.tar.gz redshift-ng-6f780c406336820ff1ea802a2f5361d96f851c96.tar.bz2 redshift-ng-6f780c406336820ff1ea802a2f5361d96f851c96.tar.xz |
Minor optimizations in selection of location provider and adjustment
method.
Diffstat (limited to 'src')
-rw-r--r-- | src/redshift.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/redshift.c b/src/redshift.c index fbc3d0f..6871045 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -560,6 +560,7 @@ main(int argc, char *argv[]) &location_providers[i]; if (strcasecmp(provider_name, p->name) == 0) { provider = p; + break; } } @@ -573,7 +574,7 @@ main(int argc, char *argv[]) if (provider_args != NULL && strcasecmp(provider_args, "help") == 0) { provider->print_help(stdout); - exit(EXIT_FAILURE); + exit(EXIT_SUCCESS); } break; case 'm': @@ -596,6 +597,7 @@ main(int argc, char *argv[]) &gamma_methods[i]; if (strcasecmp(optarg, m->name) == 0) { method = m; + break; } } @@ -611,7 +613,7 @@ main(int argc, char *argv[]) if (method_args != NULL && strcasecmp(method_args, "help") == 0) { method->print_help(stdout); - exit(EXIT_FAILURE); + exit(EXIT_SUCCESS); } break; case 'o': |