diff options
author | Marek Chalupa <mchqwerty@gmail.com> | 2016-04-22 17:46:00 +0200 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-04-23 11:38:20 +0800 |
commit | 85b80f5cf059e4e6dbcdea44679d14d5b91548cf (patch) | |
tree | eac307f91d5231c25ac3800a21f3ae890244f6fc | |
parent | 70850643f37d1b74f47affd0174101bf1f7fd2a8 (diff) | |
download | wayland-85b80f5cf059e4e6dbcdea44679d14d5b91548cf.tar.gz |
connection: remove redundant assignment
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 <mchqwerty@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
-rw-r--r-- | src/connection.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; } |