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 <[email protected]>
  • Loading branch information
txy-21 authored and xiaoxiang781216 committed Jan 16, 2025
1 parent 410ca7d commit 4432d84
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 @@ -680,7 +680,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 @@ -481,7 +481,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 @@ -741,8 +741,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 4432d84

Please sign in to comment.