the nullptr update

This commit is contained in:
2026-07-03 00:49:26 +02:00
parent 88387704e1
commit 5609ae5055
4 changed files with 8 additions and 8 deletions

View File

@@ -70,7 +70,7 @@ static void aio_set_pump_mode(libusb_device_handle* dev, const enum aio_pump_mod
}
static void aio_set_color(libusb_device_handle* dev, const enum aio_color_mode_t mode, const uint8_t speed, const struct rgb_t* colors, const uint8_t color_count) {
if (colors == NULL) // NOLINT no its not
if (colors == nullptr) // NOLINT no its not
return;
constexpr uint8_t modes[] = {0x52, 0x55, 0x55, 0x58};
@@ -132,7 +132,7 @@ static void aio_set_fan_curve(libusb_device_handle* dev, const struct curve_poin
void aio_detect(struct aio_t *aio, const float t_quiet, const float t_balanced) {
libusb_init(nullptr);
aio->handle = libusb_open_device_with_vid_pid(nullptr, AIO_USB_VID, AIO_USB_PID);
if (aio->handle == NULL) {
if (aio->handle == nullptr) {
applog(LOG_ERR, "Can't open AIO USB device %x:%x", AIO_USB_VID, AIO_USB_PID);
return;
}
@@ -160,7 +160,7 @@ void aio_detect(struct aio_t *aio, const float t_quiet, const float t_balanced)
}
void aio_update(struct aio_t *aio) {
if (aio->handle == NULL)
if (aio->handle == nullptr)
return;
aio_usb_claim(aio->handle);