From 22f3c5d2fd621d654ad326bc14958688e43c738a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 15 Jul 2022 17:45:22 -0400 Subject: Remove redundant check for command line argument count --- src/serdi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/serdi.c b/src/serdi.c index 7f57dc5f..7eaf1e73 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -182,9 +182,6 @@ int main(int argc, char** argv) { const char* const prog = argv[0]; - if (argc < 2) { - return print_usage(prog, true); - } FILE* in_fd = NULL; SerdSyntax input_syntax = (SerdSyntax)0; @@ -279,7 +276,7 @@ main(int argc, char** argv) if (a == argc) { SERDI_ERROR("missing input\n"); - return 1; + return print_usage(prog, true); } #ifdef _WIN32 -- cgit v1.2.1