Drop wl_client and user data assertions in bind handlers

A client can never be NULL and user data assertions aren't really
useful there.
master
Kirill Primak 1 year ago
parent e519635cc2
commit 0de3659698

@ -177,7 +177,6 @@ static void seat_handle_bind(struct wl_client *client, void *_wlr_seat,
uint32_t version, uint32_t id) {
// `wlr_seat` can be NULL if the seat global is being destroyed
struct wlr_seat *wlr_seat = _wlr_seat;
assert(client);
struct wl_resource *wl_resource =
wl_resource_create(client, &wl_seat_interface, version, id);

@ -246,7 +246,6 @@ static void wlr_tablet_manager_v2_destroy(struct wl_resource *resource) {
static void tablet_v2_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
struct wlr_tablet_manager_v2 *manager = data;
assert(wl_client && manager);
struct wlr_tablet_manager_client_v2 *client = calloc(1, sizeof(*client));
if (client == NULL) {

@ -89,7 +89,6 @@ static void input_manager_resource_destroy(struct wl_resource *resource) {
static void inhibit_manager_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
struct wlr_input_inhibit_manager *manager = data;
assert(wl_client && manager);
struct wl_resource *wl_resource = wl_resource_create(wl_client,
&zwlr_input_inhibit_manager_v1_interface, version, id);

@ -571,7 +571,6 @@ static const struct zwp_input_method_manager_v2_interface
static void input_method_manager_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
assert(wl_client);
struct wlr_input_method_manager_v2 *im_manager = data;
struct wl_resource *bound_resource = wl_resource_create(wl_client,

@ -461,7 +461,6 @@ static const struct zwlr_layer_shell_v1_interface layer_shell_implementation = {
static void layer_shell_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
struct wlr_layer_shell_v1 *layer_shell = data;
assert(wl_client && layer_shell);
struct wl_resource *resource = wl_resource_create(
wl_client, &zwlr_layer_shell_v1_interface, version, id);

@ -276,7 +276,6 @@ static const struct zwp_pointer_constraints_v1_interface
static void pointer_constraints_bind(struct wl_client *client, void *data,
uint32_t version, uint32_t id) {
struct wlr_pointer_constraints_v1 *pointer_constraints = data;
assert(client && pointer_constraints);
struct wl_resource *resource = wl_resource_create(client,
&zwp_pointer_constraints_v1_interface, version, id);

@ -144,7 +144,6 @@ static void server_decoration_manager_destroy_resource(
static void server_decoration_manager_bind(struct wl_client *client, void *data,
uint32_t version, uint32_t id) {
struct wlr_server_decoration_manager *manager = data;
assert(client && manager);
struct wl_resource *resource = wl_resource_create(client,
&org_kde_kwin_server_decoration_manager_interface, version, id);

@ -294,7 +294,6 @@ static const struct zwp_text_input_manager_v3_interface
static void text_input_manager_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
struct wlr_text_input_manager_v3 *manager = data;
assert(wl_client && manager);
struct wl_resource *resource = wl_resource_create(wl_client,
&zwp_text_input_manager_v3_interface, version, id);

@ -93,7 +93,6 @@ static int xdg_client_ping_timeout(void *user_data) {
static void xdg_shell_bind(struct wl_client *wl_client, void *data,
uint32_t version, uint32_t id) {
struct wlr_xdg_shell *xdg_shell = data;
assert(wl_client && xdg_shell);
struct wlr_xdg_client *client = calloc(1, sizeof(*client));
if (client == NULL) {

Loading…
Cancel
Save