[PATCH v1] libxl: remove libxl_domain_config_init from libxlBuildDomainConfig

Olaf Hering posted 1 patch 2 years, 11 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210519084000.30354-1-olaf@aepfle.de
src/libxl/libxl_conf.c | 1 -
1 file changed, 1 deletion(-)
[PATCH v1] libxl: remove libxl_domain_config_init from libxlBuildDomainConfig
Posted by Olaf Hering 2 years, 11 months ago
The passed libxl_domain_config is owned, and already initialized, by the
caller.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 src/libxl/libxl_conf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 8ea9b35292..3149ee3b4a 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2529,7 +2529,6 @@ libxlBuildDomainConfig(virPortAllocatorRange *graphicsports,
 {
     virCaps *caps = cfg->caps;
     libxl_ctx *ctx = cfg->ctx;
-    libxl_domain_config_init(d_config);
 
     if (libxlMakeDomCreateInfo(ctx, def, &d_config->c_info) < 0)
         return -1;

Re: [PATCH v1] libxl: remove libxl_domain_config_init from libxlBuildDomainConfig
Posted by Jim Fehlig 2 years, 11 months ago
On 5/19/21 2:40 AM, Olaf Hering wrote:
> The passed libxl_domain_config is owned, and already initialized, by the
> caller.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>   src/libxl/libxl_conf.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Jim Fehlig <jfehlig@suse.com>

> 
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index 8ea9b35292..3149ee3b4a 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -2529,7 +2529,6 @@ libxlBuildDomainConfig(virPortAllocatorRange *graphicsports,
>   {
>       virCaps *caps = cfg->caps;
>       libxl_ctx *ctx = cfg->ctx;
> -    libxl_domain_config_init(d_config);
>   
>       if (libxlMakeDomCreateInfo(ctx, def, &d_config->c_info) < 0)
>           return -1;
>