提交 7863f154 编写于 作者: J Ján Tomko

tools: vshCommandArgvGetArg: prefer g_strdup

Remove the use of vshStrdup.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 df329e94
......@@ -1644,7 +1644,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial)
*/
static vshCommandToken ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
vshCommandArgvGetArg(vshControl *ctl,
vshCommandArgvGetArg(vshControl *ctl G_GNUC_UNUSED,
vshCommandParser *parser,
char **res,
bool report G_GNUC_UNUSED)
......@@ -1654,7 +1654,7 @@ vshCommandArgvGetArg(vshControl *ctl,
return VSH_TK_END;
}
*res = vshStrdup(ctl, *parser->arg_pos);
*res = g_strdup(*parser->arg_pos);
parser->arg_pos++;
return VSH_TK_ARG;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册