exit(2) on unsupported positional arguments on command line

Change-Id: I32f9565c649a149638878a7283ddd8407ddff1ed
This commit is contained in:
Harald Welte 2019-12-03 22:29:26 +01:00
parent ebbfbbdbc7
commit 8984bea461
1 changed files with 5 additions and 0 deletions

View File

@ -197,6 +197,11 @@ static void handle_options(int argc, char **argv)
break;
}
}
if (argc > optind) {
fprintf(stderr, "Unsupported positional arguments on command line\n");
exit(2);
}
}
static struct osmo_timer_list print_timer;