From: Fneufneu Date: Tue, 9 Oct 2012 09:43:18 +0000 (+0200) Subject: [FreeBSD] fix unused strDevicePath variable X-Git-Tag: upstream/2.2.0~1^2~16^2^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cffe9a36153861d9e17e06f30e27b1f9ba4e1f9c;p=deb_libcec.git [FreeBSD] fix unused strDevicePath variable --- diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp index d441a48..da101e7 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp @@ -427,6 +427,8 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i for (i = 0; i < 8; ++i) { (void)snprintf(devicePath, sizeof(devicePath), "/dev/ttyU%d", i); + if (strDevicePath && strcmp(devicePath, strDevicePath) != 0) + continue; if (!access(devicePath, 0)) { snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicePath);