mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
tools: vshCommandArgvGetArg: prefer g_strdup
Remove the use of vshStrdup. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
df329e94cb
commit
7863f1547a
@ -1644,7 +1644,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static vshCommandToken ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
static vshCommandToken ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||||
vshCommandArgvGetArg(vshControl *ctl,
|
vshCommandArgvGetArg(vshControl *ctl G_GNUC_UNUSED,
|
||||||
vshCommandParser *parser,
|
vshCommandParser *parser,
|
||||||
char **res,
|
char **res,
|
||||||
bool report G_GNUC_UNUSED)
|
bool report G_GNUC_UNUSED)
|
||||||
@ -1654,7 +1654,7 @@ vshCommandArgvGetArg(vshControl *ctl,
|
|||||||
return VSH_TK_END;
|
return VSH_TK_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
*res = vshStrdup(ctl, *parser->arg_pos);
|
*res = g_strdup(*parser->arg_pos);
|
||||||
parser->arg_pos++;
|
parser->arg_pos++;
|
||||||
return VSH_TK_ARG;
|
return VSH_TK_ARG;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user