Skip to content

Commit b957e0b

Browse files
committed
Reduce scope of ports
1 parent 3ef9bad commit b957e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/device.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ uint8_t Device::getDeviceAddress() const {
249249
}
250250

251251
std::vector<uint8_t> *Device::getPortNumbers() {
252-
uint8_t ports[Usbpp::Device::MAX_PORT_NUMBERS]; // these are not chars, actually uints- these are port numbers (or something similar)
253252
std::vector<uint8_t> *ports_vec = new std::vector<uint8_t>();
254253

255254
if (pimpl->m_device != NULL) {
255+
uint8_t ports[Usbpp::Device::MAX_PORT_NUMBERS];
256256
int count = libusb_get_port_numbers(pimpl->m_device, ports, Usbpp::Device::MAX_PORT_NUMBERS);
257257
if (count > 0) {
258258
ports_vec->reserve(count);

0 commit comments

Comments
 (0)