mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
virsh: use g_strdup in virshDomainGetEditMetadata
Prefer GLib's g_strdup to vshStrdup. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
d20f55c0f3
commit
76b4cd88f5
@ -8523,7 +8523,7 @@ static const vshCmdOptDef opts_metadata[] = {
|
||||
|
||||
/* helper to add new metadata using the --edit option */
|
||||
static char *
|
||||
virshDomainGetEditMetadata(vshControl *ctl,
|
||||
virshDomainGetEditMetadata(vshControl *ctl G_GNUC_UNUSED,
|
||||
virDomainPtr dom,
|
||||
const char *uri,
|
||||
unsigned int flags)
|
||||
@ -8533,7 +8533,7 @@ virshDomainGetEditMetadata(vshControl *ctl,
|
||||
if (!(ret = virDomainGetMetadata(dom, VIR_DOMAIN_METADATA_ELEMENT,
|
||||
uri, flags))) {
|
||||
vshResetLibvirtError();
|
||||
ret = vshStrdup(ctl, "\n");
|
||||
ret = g_strdup("\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user