提交 87af7ff8 编写于 作者: M Michal Privoznik

access: Use g_strdup_printf() instead of virAsprintf()

Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 492d7cb4
......@@ -59,10 +59,8 @@ virAccessDriverPolkitFormatAction(const char *typename,
char *actionid = NULL;
size_t i;
if (virAsprintf(&actionid, "%s.%s.%s",
VIR_ACCESS_DRIVER_POLKIT_ACTION_PREFIX,
typename, permname) < 0)
return NULL;
actionid = g_strdup_printf("%s.%s.%s", VIR_ACCESS_DRIVER_POLKIT_ACTION_PREFIX,
typename, permname);
for (i = 0; actionid[i]; i++)
if (actionid[i] == '_')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册