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

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



Clang reported this as a dead store, too.

>From 016fbfb87fdafb7b6ffdea17f07af223206b0308 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering 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


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