Skip to content

Commit 8405caf

Browse files
txy-21xiaoxiang781216
authored andcommitted
test:driver_audio bug fix
Signed-off-by: tengshuangshuang <[email protected]>
1 parent a95e169 commit 8405caf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/camera/camera_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ int main(int argc, FAR char *argv[])
678678
{
679679
gettimeofday(&now, NULL);
680680
timersub(&now, &start, &delta);
681-
if (timercmp(&delta, &wait, >))
681+
if (timercmp(&delta, &wait, > /* For checkpatch */))
682682
{
683683
printf("Expire time is pasted. GoTo next state.\n");
684684
if (app_state == APP_STATE_BEFORE_CAPTURE)

testing/drivertest/drivertest_audio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ static bool audio_test_timeout(FAR struct audio_state_s *state,
479479

480480
gettimeofday(&now, NULL);
481481
timersub(&now, &start, &delta);
482-
return timercmp(&delta, &wait, >);
482+
return timercmp(&delta, &wait, > /* For checkpatch */);
483483
}
484484

485485
static int audio_test_stop(FAR struct audio_state_s *state, int direction)
@@ -739,8 +739,8 @@ static int audio_test_setup(FAR void **audio_state)
739739
attr.mq_curmsgs = 0;
740740
attr.mq_flags = 0;
741741

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

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

0 commit comments

Comments
 (0)