From e81bb0377064e9bad5808c20c17be4019accbee2 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 19 Apr 2016 13:23:36 +1200 Subject: Bail out properly when no args supplied --- fractal-gen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fractal-gen.c') diff --git a/fractal-gen.c b/fractal-gen.c index d2d21f9..855017e 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -172,6 +172,10 @@ int parse_args(int argc, char **argv) clust_id = 0; clust_total = 1; + /* bail out early if no arguments are supplied */ + if (argc <= 1) + return 1; + while ( (opt = getopt(argc, argv, "s:i:e:c:t:N:T")) != -1 ) { switch (opt) -- cgit v1.1