[PATCH 01/18] Do not save errno in virUSBDeviceSearch

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

 



The virUSBDeviceFind* callers do not check errno after calling
this function.
---
 src/util/virusb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/virusb.c b/src/util/virusb.c
index 520610b..5c39667 100644
--- a/src/util/virusb.c
+++ b/src/util/virusb.c
@@ -202,11 +202,8 @@ virUSBDeviceSearch(unsigned int vendor,
     ret = list;
 
  cleanup:
-    if (dir) {
-        int saved_errno = errno;
+    if (dir)
         closedir(dir);
-        errno = saved_errno;
-    }
 
     if (!ret)
         virObjectUnref(list);
-- 
2.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]