Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jvde-github committed Feb 22, 2025
1 parent 7db1a6f commit e362758
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Device/N2KsktCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ namespace Device {
return;
}

for (uint64_t i = 0, ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next, i++) {
uint64_t i = 0;
for (ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next, i++) {
if (ifa->ifa_addr == nullptr)
continue;

if (ifa->ifa_addr->sa_family == AF_CAN) {
DeviceList.push_back(Description(ifa->ifa_name, "", "", i, Type::N2KSCAN));
DeviceList.push_back(Description("BNME2000", "CANbus", ifa->ifa_name, i, Type::N2K));
available_intefaces.push_back(ifa->ifa_name);
}
}
Expand Down

0 comments on commit e362758

Please sign in to comment.