]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/alsa:Fix printf format string in pcm-test.c
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Wed, 26 Jun 2024 08:48:59 +0000 (01:48 -0700)
committerTakashi Iwai <tiwai@suse.de>
Thu, 27 Jun 2024 07:57:14 +0000 (09:57 +0200)
Inside of test_pcm_time() arguments are printed via printf
but '%d' is used to print @flags (of type unsigned int).
Use '%u' instead, just like we do everywhere else.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240626084859.4350-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/pcm-test.c

index de664dedb5418e4f69fe8661ce0e7a5f1fc5669d..914efcdce1ec699355556e38f09534666e9eda1b 100644 (file)
@@ -383,7 +383,7 @@ __format:
                goto __close;
        }
        if (rrate != rate) {
-               snprintf(msg, sizeof(msg), "rate mismatch %ld != %d", rate, rrate);
+               snprintf(msg, sizeof(msg), "rate mismatch %ld != %u", rate, rrate);
                goto __close;
        }
        rperiod_size = period_size;