Commit dc2998bf authored by Dima Ryazanov's avatar Dima Ryazanov Committed by Adam Jackson

xwayland: Remove a useless out-of-memory check

snprintf does not allocate memory, so we can never get an out-of-memory

(Also, the error handler would free xwl_output after it was already
registered as an event listener.)
Signed-off-by: default avatarDima Ryazanov <>
Reviewed-by: default avatarMarek Chalupa <>
parent b469fc72
......@@ -167,11 +167,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id)
&wl_output_interface, 2);
wl_output_add_listener(xwl_output->output, &output_listener, xwl_output);
if (snprintf(name, sizeof name, "XWAYLAND%d", serial++) < 0) {
ErrorF("create_output ENOMEM\n");
return NULL;
snprintf(name, sizeof name, "XWAYLAND%d", serial++);
xwl_output->xwl_screen = xwl_screen;
xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment