[libvirt] [PATCH] get_virtual_functions_linux: would mistakenly always return zero

Dave Allan dallan at redhat.com
Thu Feb 18 14:34:48 UTC 2010


On 02/18/2010 05:13 AM, Jim Meyering wrote:
> Clang reported this as a dead store, too.
>
>> From 016fbfb87fdafb7b6ffdea17f07af223206b0308 Mon Sep 17 00:00:00 2001
> From: Jim Meyering<meyering at redhat.com>
> Date: Thu, 18 Feb 2010 11:12:17 +0100
> Subject: [PATCH] get_virtual_functions_linux: would mistakenly always return zero
>
> * src/node_device/node_device_linux_sysfs.c(get_virtual_functions_linux):
> Return "ret", rather than always returning 0.
> ---
>   src/node_device/node_device_linux_sysfs.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
> index e11fb2e..c4d1d01 100644
> --- a/src/node_device/node_device_linux_sysfs.c
> +++ b/src/node_device/node_device_linux_sysfs.c
> @@ -375,7 +375,7 @@ out:
>       if (dir)
>           closedir(dir);
>       VIR_FREE(device_link);
> -    return 0;
> +    return ret;
>   }
>
>   #endif /* __linux__ */
> --
> 1.7.0.233.g05e1a
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

ACK




More information about the libvir-list mailing list