Moves variable declaration to beginning of scope

This commit is contained in:
Julian Albrecht 2020-04-07 17:59:12 +02:00 committed by akallabeth
parent 3029e3b2cf
commit 7824f0cee9

View File

@ -89,6 +89,7 @@ static UwacReturnCode set_cursor_image(UwacSeat* seat, uint32_t serial)
struct wl_cursor_image* image;
struct wl_surface* surface = NULL;
int32_t x = 0, y = 0;
int buffer_add_listener_success = -1;
if (!seat || !seat->display || !seat->default_cursor || !seat->default_cursor->images)
return UWAC_ERROR_INTERNAL;
@ -122,7 +123,6 @@ static UwacReturnCode set_cursor_image(UwacSeat* seat, uint32_t serial)
break;
}
int buffer_add_listener_success = -1;
if (buffer)
{
buffer_add_listener_success = wl_buffer_add_listener(buffer, &buffer_release_listener, seat);