swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit f0e0669bc3f4cf991674300e298e311472ba3cc8
parent f436b8c5691fd77068617aa2beaeb984093db3b4
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 28 Aug 2019 14:01:11 -0700

Remove rendundant wl_client_post_no_memory

Both callers of wayland_buffer_create_resource already report 'no memory'
errors.

Diffstat:
Mlibswc/wayland_buffer.c | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/libswc/wayland_buffer.c b/libswc/wayland_buffer.c @@ -61,13 +61,7 @@ wayland_buffer_create_resource(struct wl_client *client, uint32_t version, uint3 struct wl_resource *resource; resource = wl_resource_create(client, &wl_buffer_interface, version, id); - - if (!resource) { - wl_client_post_no_memory(client); - return NULL; - } - - wl_resource_set_implementation(resource, &buffer_implementation, buffer, &destroy_buffer); - + if (resource) + wl_resource_set_implementation(resource, &buffer_implementation, buffer, &destroy_buffer); return resource; }