summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-01-23 16:21:15 +0800
committerBryce Harrington <bryce@osg.samsung.com>2015-01-23 18:20:41 -0800
commitab3ee6f6d96c2e9adc3808975fdaf1727e5ff48e (patch)
tree49e72c020df73ee3ecb790204daa3f297d3a4a44
parent5ce947bd9043c989e2caa4a6053e542b048a5718 (diff)
downloadwayland-ab3ee6f6d96c2e9adc3808975fdaf1727e5ff48e.tar.gz
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 <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-rw-r--r--src/wayland-server.c5
1 files changed, 2 insertions, 3 deletions
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;
}