diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-04-08 12:11:45 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-04-08 12:11:45 +1200 |
commit | a80e41cd472a9999d9402c96c5fe9202f6b393c6 (patch) | |
tree | 9ef361a87dcaa4450d0836e93c56b24ea7da2f9a | |
parent | 182f093d29a1c7d12e919cd896cf63e041b3e011 (diff) | |
download | fractal-gen-a80e41cd472a9999d9402c96c5fe9202f6b393c6.tar.xz |
Explicitly set fallback/default values for all options
-rw-r--r-- | fractal-gen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fractal-gen.c b/fractal-gen.c index 38cef2f..0dd8724 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -163,7 +163,10 @@ bool args_parse_okay(int argc, char **argv) { char opt = '\0'; - /* first things first: preload default values */ + /* first things first: preload default or initial values */ + size = 0; + iterat = 0; + power = 2; cores = sysconf(_SC_NPROCESSORS_ONLN); thread_mult = 1; clust_id = 0; @@ -238,7 +241,7 @@ generator_func select_generator(const char* name) void show_help() { fprintf(stderr, - "%s -s size -i iterat -e exponent\n" + "%s -s size -i iterat [-e exponent]\n" " [-c cores] [-t thread_multiplier]\n" " [-N cluster-id -T cluster-total]\n", argv0); |