From 393d2ed5091f77c162ca7b893d59080fe56422d1 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 4 Oct 2020 20:49:56 +0200 Subject: [PATCH] Explicitly specify -? as an option in cluster --- cmd/gvmap/cluster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gvmap/cluster.c b/cmd/gvmap/cluster.c index bf97ace4b..e5232bac9 100644 --- a/cmd/gvmap/cluster.c +++ b/cmd/gvmap/cluster.c @@ -99,7 +99,7 @@ static void init(int argc, char *argv[], opts_t* opts) { Verbose = 0; opts->clustering_method = CLUSTERING_MODULARITY; - while ((c = getopt(argc, argv, ":vC:c:o:")) != -1) { + while ((c = getopt(argc, argv, ":vC:c:o:?")) != -1) { switch (c) { case 'c': if ((sscanf(optarg,"%d", &v) == 0) || (v < 0)) { @@ -120,7 +120,7 @@ static void init(int argc, char *argv[], opts_t* opts) { Verbose = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(cmd, 0); else { fprintf(stderr, " option -%c unrecognized\n", -- 2.40.0