From 7a1e7dd54963fad696aa7a1305440945ba3761d1 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 27 Feb 2024 12:28:39 +0100 Subject: [PATCH] client: simplify create_outgoing_proxy() loop Decrease the indentation a bit. No functional change. Signed-off-by: Simon Ser --- src/wayland-client.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 2954652d..3e61dad3 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -733,18 +733,14 @@ create_outgoing_proxy(struct wl_proxy *proxy, const struct wl_message *message, count = arg_count_for_signature(signature); for (i = 0; i < count; i++) { signature = get_next_argument(signature, &arg); + if (arg.type != WL_ARG_NEW_ID) + continue; - switch (arg.type) { - case WL_ARG_NEW_ID: - new_proxy = proxy_create(proxy, interface, version); - if (new_proxy == NULL) - return NULL; + new_proxy = proxy_create(proxy, interface, version); + if (new_proxy == NULL) + return NULL; - args[i].o = &new_proxy->object; - break; - default: - break; - } + args[i].o = &new_proxy->object; } return new_proxy;