mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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:
parent
1c396598ff
commit
d85c9728fb
@ -1341,13 +1341,7 @@ int define_commands(struct cmd_context *cmdtool, const char *run_name)
|
|||||||
cmd = &commands[cmd_count];
|
cmd = &commands[cmd_count];
|
||||||
cmd->command_index = cmd_count;
|
cmd->command_index = cmd_count;
|
||||||
cmd_count++;
|
cmd_count++;
|
||||||
cmd->name = dm_pool_strdup(cmdtool->libmem, name);
|
cmd->name = name;
|
||||||
|
|
||||||
if (!cmd->name) {
|
|
||||||
/* FIXME */
|
|
||||||
stack;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (run_name && strcmp(run_name, name)) {
|
if (run_name && strcmp(run_name, name)) {
|
||||||
skip = 1;
|
skip = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user