Skip to content

Commit d3b1127

Browse files
committed
Remove duplicate help command code
1 parent 0afc004 commit d3b1127

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pg_probackup.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,8 @@ main(int argc, char *argv[])
271271
backup_subcmd = SHOW_CONFIG_CMD;
272272
else if (strcmp(argv[optind], "help") == 0)
273273
{
274-
if (argc - optind < 2)
275-
help_pg_probackup();
276-
else
277-
help_command(argv[optind + 1]);
274+
optind++;
275+
help_opt = true;
278276
}
279277
else if (strcmp(argv[optind], "version") == 0)
280278
version_opt = true;
@@ -284,7 +282,7 @@ main(int argc, char *argv[])
284282

285283
if (help_opt)
286284
{
287-
if (backup_subcmd == NO_CMD || argc - optind < 1)
285+
if (argc - optind < 1)
288286
help_pg_probackup();
289287
else
290288
help_command(argv[optind]);

0 commit comments

Comments
 (0)