[FreeBSD] fix unused strDevicePath variable
[deb_libcec.git] / src / lib / adapter / Pulse-Eight / USBCECAdapterDetection.cpp
index d441a48a787b3756141862fdd346b9c5f8898b05..da101e702a60e1d86c77c3b3319fdea141114f84 100644 (file)
@@ -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);