mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
hidpp20: add an assert to shut up scan-build
Not sure why it thinks we're potentially dereferencing a NULL-pointer here but from the trace it looks like it thinks macro and a previously nullified profile->macros are the same. They aren't, macro was just allocated here and shouldn't be NULL if we get here. Anyway, add an assert and move on. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
b9f6554767
commit
83345a17d2
@@ -1618,6 +1618,7 @@ hidpp20_onboard_profiles_parse_macro(struct hidpp20_device *device,
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
m = ¯o[i];
|
||||
assert(m != NULL);
|
||||
switch (m->any.type) {
|
||||
case HIDPP20_MACRO_DELAY:
|
||||
m->delay.time = hidpp_be_u16_to_cpu(m->delay.time);
|
||||
|
||||
Reference in New Issue
Block a user