Skip to content

Commit

Permalink
test:driver_audio bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
  • Loading branch information
txy-21 authored and Zhangshoukui committed Jan 15, 2025
1 parent 1a18760 commit 0fad40b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/camera/camera_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ int main(int argc, FAR char *argv[])
{
gettimeofday(&now, NULL);
timersub(&now, &start, &delta);
if (timercmp(&delta, &wait, >))
if (timercmp(&delta, &wait, > /* For checkpatch */))
{
printf("Expire time is pasted. GoTo next state.\n");
if (app_state == APP_STATE_BEFORE_CAPTURE)
Expand Down
6 changes: 3 additions & 3 deletions testing/drivertest/drivertest_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ static bool audio_test_timeout(FAR struct audio_state_s *state,

gettimeofday(&now, NULL);
timersub(&now, &start, &delta);
return timercmp(&delta, &wait, >);
return timercmp(&delta, &wait, > /* For checkpatch */);
}

static int audio_test_stop(FAR struct audio_state_s *state, int direction)
Expand Down Expand Up @@ -739,8 +739,8 @@ static int audio_test_setup(FAR void **audio_state)
attr.mq_curmsgs = 0;
attr.mq_flags = 0;

snprintf(state->mqname, sizeof(state->mqname), "/tmp/%0lx",
(unsigned long)((uintptr_t)state));
snprintf(state->mqname, sizeof(state->mqname), "/tmp/%p",
((void *)state));

state->mq = mq_open(state->mqname, O_RDWR | O_CREAT, 0644, &attr);
assert_false(state->mq < 0);
Expand Down

0 comments on commit 0fad40b

Please sign in to comment.