From: Jonas Ådahl Date: Fri, 23 Jan 2015 08:21:15 +0000 (+0800) Subject: server: Use existing id variable when inserting created object X-Git-Tag: 1.6.92~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab3ee6f6d96c2e9adc3808975fdaf1727e5ff48e;p=platform%2Fupstream%2Fwayland.git server: Use existing id variable when inserting created object We already have the id variable there and it makes it slightly easier to read. Signed-off-by: Jonas Ådahl Reviewed-by: Bryce Harrington --- diff --git a/src/wayland-server.c b/src/wayland-server.c index c845dd6..cde1eef 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1313,11 +1313,10 @@ wl_resource_create(struct wl_client *client, resource->version = version; resource->dispatcher = NULL; - if (wl_map_insert_at(&client->objects, 0, resource->object.id, resource) < 0) { + if (wl_map_insert_at(&client->objects, 0, id, resource) < 0) { wl_resource_post_error(client->display_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, - "invalid new id %d", - resource->object.id); + "invalid new id %d", id); free(resource); return NULL; }