Skip to content

Commit

Permalink
Improve "skipping unsupported command" message.
Browse files Browse the repository at this point in the history
  • Loading branch information
matlo committed May 3, 2020
1 parent ec93460 commit eb77c85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/haptic/source/haptic_source_lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ static void haptic_source_lg_process(struct haptic_source_state * state, size_t
break;
default:
{
static int warn = 1;
if (warn == 1) {
static int warn[0x10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
if (cmd < sizeof(warn) / sizeof(*warn) && warn[cmd] == 1) {
gwarn("skipping unsupported command %s\n", ff_lg_get_cmd_name(cmd));
warn = 0;
warn[cmd] = 0;
}
}
break;
Expand Down

0 comments on commit eb77c85

Please sign in to comment.