mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
config: wscons: use asprintf() instead of deprecated Xprintf()
The Xprintf() function is deprecated. Most of it's call sites had been moved
to asprintf(), so also do it for the remaining two ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1449>
(cherry picked from commit 2d4fa74000)
This commit is contained in:
committed by
Alan Coopersmith
parent
598bbe6e51
commit
63f7b94597
@@ -126,8 +126,7 @@ wscons_add_keyboard(void)
|
||||
input_options = input_option_new(input_options, "name", WSCONS_KBD_DEVICE);
|
||||
input_options = input_option_new(input_options, "driver", "kbd");
|
||||
|
||||
config_info = Xprintf("wscons:%s", WSCONS_KBD_DEVICE);
|
||||
if (!config_info)
|
||||
if (asprintf(&config_info, "wscons:%s", WSCONS_KBD_DEVICE) == -1)
|
||||
goto unwind;
|
||||
if (KB_ENCODING(wsenc) == KB_USER) {
|
||||
/* Ignore wscons "user" layout */
|
||||
@@ -190,8 +189,7 @@ wscons_add_pointer(const char *path, const char *driver, int flags)
|
||||
char *config_info = NULL;
|
||||
int rc;
|
||||
|
||||
config_info = Xprintf("wscons:%s", path);
|
||||
if (!config_info)
|
||||
if (asprintf(&config_info, "wscons:%s", path) == -1)
|
||||
return;
|
||||
|
||||
input_options = input_option_new(input_options, "_source", "server/wscons");
|
||||
|
||||
Reference in New Issue
Block a user