From b914530d62d213a28aa8f87c5a4e149f435a5b35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Tue, 21 Jun 2016 13:19:19 +0200 Subject: [PATCH] Do not save errno in virUSBDeviceSearch 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 520610baa0..5c39667920 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.47.2