Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Oct 3, 2024
1 parent 5e5e54f commit 8091cd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shared/liboxide/udev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ namespace Oxide {
}

void UDev::subsystem(const QString& subsystem, std::function<void(const Device&)> callback){
deviceType(subsystem, NULL, callback);
deviceType(subsystem, "", callback);
}

void UDev::subsystem(const QString& subsystem, std::function<void()> callback){
deviceType(subsystem, NULL, callback);
deviceType(subsystem, "", callback);
}

void UDev::deviceType(const QString& subsystem, const QString& deviceType, std::function<void(const Device&)> callback){
Expand Down Expand Up @@ -144,10 +144,12 @@ namespace Oxide {
}
if(udev_enumerate_add_match_subsystem(udevEnumeration, subsystem.toUtf8().constData()) < 0){
O_WARNING("Failed to add subsystem");
udev_enumerate_unref(udevEnumeration);
return deviceList;
}
if(udev_enumerate_scan_devices(udevEnumeration) < 0){
O_WARNING("Failed to scan devices");
udev_enumerate_unref(udevEnumeration);
return deviceList;
}
struct udev_list_entry* udevDeviceList = udev_enumerate_get_list_entry(udevEnumeration);
Expand Down

0 comments on commit 8091cd9

Please sign in to comment.