1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

man: refactor check for variant

Remove unnecessary checks and move the comment to the 1st. check.
This commit is contained in:
Zdenek Kabelac 2024-11-20 12:35:17 +01:00
parent c4d4bddfce
commit ebadd3ccc6

View File

@ -791,6 +791,7 @@ static void _print_man_usage_common_cmd(struct command *cmd)
int i, sep, oo, opt_enum; int i, sep, oo, opt_enum;
int found_common_command = 0; int found_common_command = 0;
/* common cmd options only used with variants */
if (cna->variants < 2) if (cna->variants < 2)
return; return;
@ -824,10 +825,6 @@ static void _print_man_usage_common_cmd(struct command *cmd)
if (!opt_names[opt_enum].short_opt) if (!opt_names[opt_enum].short_opt)
continue; continue;
/* common cmd options only used with variants */
if (cna->variants < 2)
continue;
if (_is_lvm_all_opt(opt_enum)) if (_is_lvm_all_opt(opt_enum))
continue; continue;
@ -861,10 +858,6 @@ static void _print_man_usage_common_cmd(struct command *cmd)
if (opt_names[opt_enum].short_opt) if (opt_names[opt_enum].short_opt)
continue; continue;
/* common cmd options only used with variants */
if (cna->variants < 2)
continue;
if (_is_lvm_all_opt(opt_enum)) if (_is_lvm_all_opt(opt_enum))
continue; continue;