Browse Source

LMSDevice: LMS_GetDeviceList() may return a negative number

Change-Id: I855bd8ea6d9cb0f285f4dbbf3bcd09bff4e71044
Fixes: CID#240718
changes/28/25928/2
Vadim Yanitskiy 10 months ago
parent
commit
019d698126
  1. 7
      Transceiver52M/device/lms/LMSDevice.cpp

7
Transceiver52M/device/lms/LMSDevice.cpp

@ -277,11 +277,12 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
LMS_RegisterLogHandler(&lms_log_callback);
if ((n = LMS_GetDeviceList(NULL)) < 0)
if ((rc = LMS_GetDeviceList(NULL)) < 0)
LOGC(DDEV, ERROR) << "LMS_GetDeviceList(NULL) failed";
LOGC(DDEV, INFO) << "Devices found: " << n;
if (n < 1)
LOGC(DDEV, INFO) << "Devices found: " << rc;
if (rc < 1)
return -1;
n = rc;
info_list = new lms_info_str_t[n];

Loading…
Cancel
Save