summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/system.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 20:36:57 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 21:32:41 +0100
commit12764781c6053898925484dee07e71a52abc4f26 (patch)
tree3f89294c8053770ac4e1e4769bfd28a234554ee6 /rbutil/rbutilqt/base/system.cpp
parentf608de723c863abc0e32cd7584c046eceb910d78 (diff)
downloadrockbox-12764781c6.tar.gz
rockbox-12764781c6.tar.bz2
rockbox-12764781c6.zip
rbutil: Modernize code to use C++11 nullptr.
Change-Id: I112cf95122a896cdb30a823b4c1f49831273dc7e
Diffstat (limited to 'rbutil/rbutilqt/base/system.cpp')
-rw-r--r--rbutil/rbutilqt/base/system.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index 73f5024fa2..dafab971ec 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -242,18 +242,18 @@ QMultiMap<uint32_t, QString> System::listUsbDevices(void)
LOG_INFO() << "Searching for USB devices";
#if defined(Q_OS_LINUX)
libusb_device **devs;
- if(libusb_init(NULL) != 0) {
+ if(libusb_init(nullptr) != 0) {
LOG_ERROR() << "Initializing libusb-1 failed.";
return usbids;
}
- if(libusb_get_device_list(NULL, &devs) < 1) {
+ if(libusb_get_device_list(nullptr, &devs) < 1) {
LOG_ERROR() << "Error getting device list.";
return usbids;
}
libusb_device *dev;
int i = 0;
- while((dev = devs[i++]) != NULL) {
+ while((dev = devs[i++]) != nullptr) {
QString name;
unsigned char buf[256];
uint32_t id;
@@ -279,7 +279,7 @@ QMultiMap<uint32_t, QString> System::listUsbDevices(void)
}
libusb_free_device_list(devs, 1);
- libusb_exit(NULL);
+ libusb_exit(nullptr);
#endif
#if defined(Q_OS_MACX)