client: simplify create_proxies() loop

Decrease the indentation a bit. No functional change.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2024-02-27 12:30:03 +01:00
parent 7a1e7dd549
commit 440defbd2b

View file

@ -1487,22 +1487,19 @@ create_proxies(struct wl_proxy *sender, struct wl_closure *closure)
count = arg_count_for_signature(signature);
for (i = 0; i < count; i++) {
signature = get_next_argument(signature, &arg);
switch (arg.type) {
case WL_ARG_NEW_ID:
id = closure->args[i].n;
if (id == 0) {
closure->args[i].o = NULL;
break;
}
proxy = wl_proxy_create_for_id(sender, id,
closure->message->types[i]);
if (proxy == NULL)
return -1;
closure->args[i].o = (struct wl_object *)proxy;
break;
default:
break;
if (arg.type != WL_ARG_NEW_ID)
continue;
id = closure->args[i].n;
if (id == 0) {
closure->args[i].o = NULL;
continue;
}
proxy = wl_proxy_create_for_id(sender, id,
closure->message->types[i]);
if (proxy == NULL)
return -1;
closure->args[i].o = (struct wl_object *)proxy;
}
return 0;