summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2020-07-08 23:31:24 +0900
committerMaciej Żenczykowski <maze@google.com>2020-07-08 14:45:34 +0000
commit164a8c4e4e8ffb194bd7b60ed9d7d48c6be2a64d (patch)
treed1a1ed61f403660631b39ea8fadf431b118393ee
parent4336dde0196f63d94df221456965c564c9392fd0 (diff)
downloadapf-164a8c4e4e8ffb194bd7b60ed9d7d48c6be2a64d.tar.gz
Remove useless limitation on argc.
The current code of apf_run limits the number of arguments to 8. This prevents passing in all of program, packet, data, and --trace, which is perhaps the most useful way to run the code. Simply remove the check. It's not useful, because the code already parses argv using getopt_long_only and rejects all invalid arguments. Test: apf_run --trace --program $PROGRAM --packet $PACKET --data $DATA --age $AGE Change-Id: I99fa47f275de9cfc8f66397555d6f4ea4a02ec75
-rw-r--r--apf_run.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/apf_run.c b/apf_run.c
index 0b36b0e..38d28a2 100644
--- a/apf_run.c
+++ b/apf_run.c
@@ -181,11 +181,6 @@ void print_usage(char* cmd) {
}
int main(int argc, char* argv[]) {
- if (argc > 9) {
- print_usage(argv[0]);
- exit(1);
- }
-
uint8_t* program = NULL;
uint32_t program_len;
const char* filename = NULL;