aboutsummaryrefslogtreecommitdiff
path: root/fractal-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'fractal-gen.c')
-rw-r--r--fractal-gen.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fractal-gen.c b/fractal-gen.c
index cc4d6d2..7f651b6 100644
--- a/fractal-gen.c
+++ b/fractal-gen.c
@@ -194,34 +194,34 @@ bool args_parse_okay(int argc, char **argv)
/* Extend number of threads to multiplier value */
cores *= thread_mult;
- /* Interlacing is column-based, can't have more workers than columns */
- if (cores > size)
+ if (size <= 0)
{
- cores = size;
- fprintf(stderr, "WARN: Capping number of threads to image size (%d)\n", cores);
+ fprintf(stderr, "ERROR: size must be positive\n");
+ return false;
}
- if (size % clust_total != 0)
+ if (iterat <= 0)
{
- fprintf(stderr, "ERROR: image size must be an exact multiple of clust_total\n");
+ fprintf(stderr, "ERROR: max iteration count must be positive\n");
return false;
}
- if (size <= 0)
+ /* Interlacing is column-based, can't have more workers than columns */
+ if (cores > size)
{
- fprintf(stderr, "size should be positive\n");
- return false;
+ cores = size;
+ fprintf(stderr, "WARN: Capping number of threads to image size (%d)\n", cores);
}
- if (iterat <= 0)
+ if (size % clust_total != 0)
{
- fprintf(stderr, "iteration count should be positive\n");
+ fprintf(stderr, "ERROR: image size must be an exact multiple of clust_total\n");
return false;
}
if (cores <= 0)
{
- fprintf(stderr, "core counts should be positive\n");
+ fprintf(stderr, "ERROR: core counts should be positive\n");
return false;
}
return true;