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

command: no need to duplicate const mem

No need to duplicate const char* here as
we refer already constant string in .rodata segment.
This commit is contained in:
Zdenek Kabelac 2024-05-11 21:59:48 +02:00
parent 1c396598ff
commit d85c9728fb

View File

@ -1341,13 +1341,7 @@ int define_commands(struct cmd_context *cmdtool, const char *run_name)
cmd = &commands[cmd_count];
cmd->command_index = cmd_count;
cmd_count++;
cmd->name = dm_pool_strdup(cmdtool->libmem, name);
if (!cmd->name) {
/* FIXME */
stack;
return 0;
}
cmd->name = name;
if (run_name && strcmp(run_name, name)) {
skip = 1;