[libvirt] [PATCH 14/23] qemu_conf: split out virQEMUDriverConfigLoadProcessEntry

Ján Tomko jtomko at redhat.com
Fri Jan 18 12:05:56 UTC 2019


On Thu, Jan 17, 2019 at 09:10:11AM -0500, John Ferlan wrote:
>On 1/15/19 8:23 AM, Ján Tomko wrote:
>> @@ -894,79 +981,10 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
>>          goto cleanup;
>>      if (virConfGetValueBool(conf, "auto_start_bypass_cache", &cfg->autoStartBypassCache) < 0)
>>          goto cleanup;
>> -
>> -    if (virConfGetValueStringList(conf, "hugetlbfs_mount", true,
>> -                                  &hugetlbfs) < 0)
>> -        goto cleanup;
>> -    if (hugetlbfs) {
>> -        /* There already might be something autodetected. Avoid leaking it. */
>> -        while (cfg->nhugetlbfs) {
>> -            cfg->nhugetlbfs--;
>> -            VIR_FREE(cfg->hugetlbfs[cfg->nhugetlbfs].mnt_dir);
>> -        }
>> -        VIR_FREE(cfg->hugetlbfs);
>> -
>> -        cfg->nhugetlbfs = virStringListLength((const char *const *)hugetlbfs);
>> -        if (hugetlbfs[0] &&
>> -            VIR_ALLOC_N(cfg->hugetlbfs, cfg->nhugetlbfs) < 0)
>> -            goto cleanup;
>> -
>> -        for (i = 0; hugetlbfs[i] != NULL; i++) {
>> -            if (virQEMUDriverConfigHugeTLBFSInit(&cfg->hugetlbfs[i],
>> -                                                 hugetlbfs[i], i != 0) < 0)
>> -                goto cleanup;
>> -        }
>> -    }
>> -
>> -    if (virConfGetValueString(conf, "bridge_helper", &cfg->bridgeHelperName) < 0)
>> -        goto cleanup;
>> -
>> -    if (virConfGetValueString(conf, "pr_helper", &cfg->prHelperName) < 0)
>>          goto cleanup;
>
>This makes a double "goto cleanup;" which you fix in the next patch, but
>causes this patch to fail to compile...
>

Fun, clang does not mind at all.

I found another occurrence in a later patch.

Jano

>With all that this patch is good.
>
>John
>
>[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190118/4fae0996/attachment-0001.sig>


More information about the libvir-list mailing list