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

Re: [Xen-devel] [PATCH 3/5] xl: add PV sound condif parser



On Mon, Oct 02, 2017 at 12:49:22PM +0300, Oleksandr Grytsov wrote:
> +static void parse_vsnd_card_config(const XLU_Config *config,
> +                                   XLU_ConfigValue *card_value,
> +                                   libxl_domain_config *d_config)
> +{
> +    int ret;
> +
> +    XLU_ConfigList *card_list;
> +
> +    // get card

Please delete this.

> +    ret = xlu_cfg_value_get_list(config, card_value,  &card_list, 0);
> +
> +    if (ret) {
> +        fprintf(stderr, "Failed to get vsnd card list: %s\n", strerror(ret));
> +        goto out;
> +    }
> +
> +    libxl_device_vsnd *vsnd;
> +
> +    vsnd = ARRAY_EXTEND_INIT(d_config->vsnds,
> +                             d_config->num_vsnds,
> +                             libxl_device_vsnd_init);
> +
> +    const char *card_item;
> +    int item = 0;
> +

Mixing code and declarations will break.

> +    while ((card_item = xlu_cfg_get_listitem(card_list, item++)) != NULL) {
> +        ret = parse_vsnd_item(vsnd, card_item);
> +        if (ret) goto out;
> +    }
> +
> +    ret = 0;
> +
> +out:
> +    if (ret) exit(EXIT_FAILURE);
> +}

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.