aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-03 22:19:32 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-03 22:19:32 +0100
commitabbdbfbbaba26c3c3e6ce9f2971f29c693f8c3b9 (patch)
tree820de42008fc6992939fbd317e1438a02e369a49
parentdb4839c267cf5a133e92d93d6d12ef7513b23e62 (diff)
msc: exit(2) on unsupported positional arguments on command line
-rw-r--r--src/osmo-msc/msc_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index e7570cde5..cffdaefc3 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -198,6 +198,11 @@ static void handle_options(int argc, char **argv)
exit(-1);
}
}
+
+ if (argc > optind) {
+ fprintf(stderr, "Unsupported positional arguments on command line\n");
+ exit(2);
+ }
}
struct gsm_network *msc_network_alloc(void *ctx,