mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
hidpp10: fix coverity issue
profile->dpi_modes[i].led[] is an array of boolean. Given that the callers (hidpp10_fill_dpi_modes_*()) already are doing the comparison against 0x02, I guess this is just copy/paste error. Fixes #152 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
committed by
Peter Hutterer
parent
5bbb2b28ea
commit
8367569236
@@ -1525,10 +1525,10 @@ hidpp10_get_profile(struct hidpp10_device *dev, int8_t number, struct hidpp10_pr
|
||||
profile->dpi_modes[i].yres);
|
||||
hidpp_log_raw(&dev->base,
|
||||
"LED status: 1:%s 2:%s 3:%s 4:%s\n",
|
||||
(profile->dpi_modes[i].led[0] & 0x2) ? "on" : "off",
|
||||
(profile->dpi_modes[i].led[1] & 0x2) ? "on" : "off",
|
||||
(profile->dpi_modes[i].led[2] & 0x2) ? "on" : "off",
|
||||
(profile->dpi_modes[i].led[3] & 0x2) ? "on" : "off");
|
||||
profile->dpi_modes[i].led[0] ? "on" : "off",
|
||||
profile->dpi_modes[i].led[1] ? "on" : "off",
|
||||
profile->dpi_modes[i].led[2] ? "on" : "off",
|
||||
profile->dpi_modes[i].led[3] ? "on" : "off");
|
||||
}
|
||||
hidpp_log_raw(&dev->base, "Angle correction: %d\n", profile->angle_correction);
|
||||
hidpp_log_raw(&dev->base, "Default DPI mode: %d\n", profile->default_dpi_mode);
|
||||
|
||||
Reference in New Issue
Block a user