mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
command: replace strcmp with enum
Here we already know 'enum' value, so compare just those instead of calling strcmp().
This commit is contained in:
parent
1a219c69ee
commit
fd8ed7554e
@ -1184,7 +1184,7 @@ void factor_common_options(void)
|
||||
|
||||
for (ci = 0; ci < COMMAND_COUNT; ci++) {
|
||||
cmd = &commands[ci];
|
||||
if (strcmp(cmd->name, command_names[cn].name))
|
||||
if (cmd->lvm_command_enum != command_names[cn].lvm_command_enum)
|
||||
continue;
|
||||
|
||||
command_names_args[cn].variants++;
|
||||
@ -1195,7 +1195,7 @@ void factor_common_options(void)
|
||||
for (ci = 0; ci < COMMAND_COUNT; ci++) {
|
||||
cmd = &commands[ci];
|
||||
|
||||
if (strcmp(cmd->name, command_names[cn].name))
|
||||
if (cmd->lvm_command_enum != command_names[cn].lvm_command_enum)
|
||||
continue;
|
||||
|
||||
if (cmd->ro_count || cmd->any_ro_count)
|
||||
|
Loading…
Reference in New Issue
Block a user