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