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

Re: [libvirt] [PATCH 3/5] nodedev: Fix sysfs paths for vport operations



On 08/17/2010 02:51 PM, Jiri Denemark wrote:
> +    if (stat(operation_path, &st) != 0) {
> +        VIR_FREE(operation_path);
> +        if (virAsprintf(&operation_path,
> +                        "%shost%d%s",
> +                        LINUX_SYSFS_SCSI_HOST_PREFIX,
> +                        parent_host,
> +                        operation_file) < 0) {

It's slightly more efficient to write:

virAsprintf(&operation_path, LINUX_SYSFS_SCSI_HOST_PREFIX "host%d%s",
            parent_host, operation_file)

but it doesn't bother me if you think it is easier to leave it as-written.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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