1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-05 15:05:48 +02:00

Remove cfgCmdNone from CFG_COMMAND_TOTAL.

cfgCmdNone is used to indicate a missing or invalid command so should not be used in the total used for command process.
This commit is contained in:
David Steele 2020-12-16 11:33:51 -05:00
parent 558ff1e555
commit 996de0a3e6
3 changed files with 3 additions and 4 deletions

View File

@ -207,7 +207,6 @@ sub buildConfig
# Add "none" command that is used to initialize the current command before anything is parsed
push(@{$rhEnum->{&BLD_LIST}}, buildConfigCommandEnum('none'));
$iCommandTotal++;
$strBuildSource .=
")\n";

View File

@ -169,7 +169,7 @@ helpRender(void)
for (ConfigCommand commandId = 0; commandId < CFG_COMMAND_TOTAL; commandId++)
{
if (commandId == cfgCmdNone || cfgCommandInternal(commandId))
if (cfgCommandInternal(commandId))
continue;
if (strlen(cfgCommandName(commandId)) > commandSizeMax)
@ -179,7 +179,7 @@ helpRender(void)
// Output help for each command
for (ConfigCommand commandId = 0; commandId < CFG_COMMAND_TOTAL; commandId++)
{
if (commandId == cfgCmdNone || cfgCommandInternal(commandId))
if (cfgCommandInternal(commandId))
continue;
strCatFmt(

View File

@ -50,7 +50,7 @@ Command constants
#define CFGCMD_VERSION "version"
STRING_DECLARE(CFGCMD_VERSION_STR);
#define CFG_COMMAND_TOTAL 21
#define CFG_COMMAND_TOTAL 20
/***********************************************************************************************************************************
Option group constants