From 85b80f5cf059e4e6dbcdea44679d14d5b91548cf Mon Sep 17 00:00:00 2001 From: Marek Chalupa Date: Fri, 22 Apr 2016 17:46:00 +0200 Subject: [PATCH] connection: remove redundant assignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit the code is something like: if (object == NULL && ...) { object = NULL; return; } first, the object is already NULL, second, the assignment has no effect since we return from the function right away Signed-off-by: Marek Chalupa Reviewed-by: Eric Engestrom Reviewed-by: Jonas Ådahl --- src/connection.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index c0e322f..747229e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -838,7 +838,6 @@ wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects) } else if (object == NULL && id != 0) { wl_log("unknown object (%u), message %s(%s)\n", id, message->name, message->signature); - object = NULL; errno = EINVAL; return -1; } -- 2.7.4