diff options
author | Simon Ser <contact@emersion.fr> | 2024-02-27 12:28:39 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-03-06 14:18:18 +0100 |
commit | 7a1e7dd54963fad696aa7a1305440945ba3761d1 (patch) | |
tree | bdd589cd1c22f5812b0b78a70fef45cf1cebb260 | |
parent | 830883e5b2d3ec20a4f73258bdd97d12e5e9c9bc (diff) |
client: simplify create_outgoing_proxy() loop
Decrease the indentation a bit. No functional change.
Signed-off-by: Simon Ser <contact@emersion.fr>
-rw-r--r-- | src/wayland-client.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c index 2954652..3e61dad 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; |