]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/console-vc: Silence warning about sprintf() on OpenBSD
authorThomas Huth <thuth@redhat.com>
Tue, 15 Oct 2024 11:25:10 +0000 (13:25 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 21 Oct 2024 19:40:47 +0000 (22:40 +0300)
commit30b1fc5a9820c7d8db273afd0c87f093f2857f9f
tree66db41f05fe72569880ecd1fb04f18d19d59889d
parentfe71f4b0deeaf14291a047d87b13e1133e355314
ui/console-vc: Silence warning about sprintf() on OpenBSD

The linker on OpenBSD complains:

 ld: warning: console-vc.c:824 (../src/ui/console-vc.c:824)([...]):
 warning: sprintf() is often misused, please use snprintf()

Using g_strdup_printf() is certainly better here, so let's switch
to that function instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
ui/console-vc.c