[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-glib] Add API to redefine an existing domain



On Mon, Nov 21, 2011 at 9:02 PM, Zeeshan Ali (Khattak)
<zeeshanak gnome org> wrote:
> +    g_return_val_if_fail(err == NULL || *err == NULL, FALSE);

this needs update, as I wrote before.

> +    xml = gvir_config_object_to_xml(GVIR_CONFIG_OBJECT(conf));

hmm, don't we need to free xml?

> +    virDomainGetUUIDString(priv->handle, uuid);
> +
> +    if (strcmp (uuid, priv->uuid) != 0) {
> +        if (err != NULL)
> +            *err = gvir_error_new_literal(GVIR_DOMAIN_ERROR,

I prefer g_strcmp0, because it's safer.

But the main issue is that you don't say clearly if we can safely
ignore that new handle, at the very least if there is no leakage. A
comment in the code would be welcome.

regards

-- 
Marc-André Lureau


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]