swc

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

commit 5d81837b0b4f5ee43a69bafe6bf1e694c6b8abda
parent e60cdcf0f81f06bbb4b9a8706997a548504d1398
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 28 Jan 2020 14:11:14 -0800

Add some missing returns

Diffstat:
Mlibswc/kde_decoration.c | 4+++-
Mlibswc/xdg_decoration.c | 4+++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libswc/kde_decoration.c b/libswc/kde_decoration.c @@ -44,8 +44,10 @@ create(struct wl_client *client, struct wl_resource *resource, uint32_t id, stru struct wl_resource *decoration; decoration = wl_resource_create(client, &org_kde_kwin_server_decoration_interface, wl_resource_get_version(resource), id); - if (!decoration) + if (!decoration) { wl_resource_post_no_memory(resource); + return; + } wl_resource_set_implementation(decoration, &decoration_impl, NULL, NULL); org_kde_kwin_server_decoration_send_mode(decoration, ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER); } diff --git a/libswc/xdg_decoration.c b/libswc/xdg_decoration.c @@ -33,8 +33,10 @@ get_toplevel_decoration(struct wl_client *client, struct wl_resource *resource, struct wl_resource *decoration; decoration = wl_resource_create(client, &zxdg_toplevel_decoration_v1_interface, wl_resource_get_version(resource), id); - if (!decoration) + if (!decoration) { wl_resource_post_no_memory(resource); + return; + } zxdg_toplevel_decoration_v1_send_configure(decoration, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); }