X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FUSBCECAdapterDetection.cpp;h=8775b4e55bbb2444c8b9a841e3e57f0e3748773f;hb=c7bee84a44610d76b8fb8d3b34f9f5b24454796b;hp=c2a0b5cfb47b77ff48ae942a3df55eca6aad2d60;hpb=5458fd775d4c7e4e9ffe8bdbfd47e540ca712a31;p=deb_libcec.git diff --git a/src/lib/adapter/USBCECAdapterDetection.cpp b/src/lib/adapter/USBCECAdapterDetection.cpp index c2a0b5c..8775b4e 100644 --- a/src/lib/adapter/USBCECAdapterDetection.cpp +++ b/src/lib/adapter/USBCECAdapterDetection.cpp @@ -333,12 +333,11 @@ 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 (!access(devicePath, 0)) - { - snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicePath); - snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", devicePath); - ++iFound; - } + if (!access(devicePath, 0)) + { + snprintf(deviceList[iFound ].path, sizeof(deviceList[iFound].path), "%s", devicePath); + snprintf(deviceList[iFound++].comm, sizeof(deviceList[iFound].path), "%s", devicePath); + } } #endif