diff --git a/src/common/cmdline.c b/src/common/cmdline.c index 057afaa67..3d4ac8cb1 100644 --- a/src/common/cmdline.c +++ b/src/common/cmdline.c @@ -57,14 +57,14 @@ static unsigned ArgCount = 0; -void InitCmdLine (char* aArgVec[], unsigned aArgCount) +void InitCmdLine (unsigned aArgCount, char* aArgVec[]) /* Initialize command line parsing. aArgVec is the argument array terminated by * a NULL pointer (as usual), ArgCount is the number of valid arguments in the * array. Both arguments are remembered in static storage. */ { - ArgVec = aArgVec; ArgCount = aArgCount; + ArgVec = aArgVec; } @@ -134,6 +134,8 @@ void LongOption (int* ArgNum, const LongOpt* OptTab, unsigned OptCount) } else { OptTab->Func (Opt, 0); } + /* Done */ + return; } /* Next table entry */ diff --git a/src/common/cmdline.h b/src/common/cmdline.h index c0c5a1af7..aadeb0626 100644 --- a/src/common/cmdline.h +++ b/src/common/cmdline.h @@ -47,7 +47,7 @@ /* Structure defining a long option */ typedef struct LongOpt LongOpt; struct LongOpt { - const char* Option; + const char* Option; unsigned ArgCount; void (*Func) (const char* Opt, const char* Arg); }; @@ -60,7 +60,7 @@ struct LongOpt { -void InitCmdLine (char* aArgVec[], unsigned aArgCount); +void InitCmdLine (unsigned aArgCount, char* aArgVec[]); /* Initialize command line parsing. aArgVec is the argument array terminated by * a NULL pointer (as usual), ArgCount is the number of valid arguments in the * array. Both arguments are remembered in static storage.