From: Ján Tomko Date: Tue, 21 Jun 2016 11:19:19 +0000 (+0200) Subject: Do not save errno in virUSBDeviceSearch X-Git-Tag: v2.0.0-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b914530d62d213a28aa8f87c5a4e149f435a5b35;p=thirdparty%2Flibvirt.git Do not save errno in virUSBDeviceSearch The virUSBDeviceFind* callers do not check errno after calling this function. --- 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);