Re: [PATCH wayland] connection: remove redundant assignment

2016-04-22 Thread Jonas Ã…dahl
On Fri, Apr 22, 2016 at 05:46:00PM +0200, Marek Chalupa wrote: > 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 >

Re: [PATCH wayland] connection: remove redundant assignment

2016-04-22 Thread Eric Engestrom
On Fri, Apr 22, 2016 at 05:46:00PM +0200, Marek Chalupa wrote: > the code is something like: > Maybe add: struct wl_object *object; to your abridged version to clearly show that it's a local object? > if (object == NULL && ...) { > object = NULL; > return; > } > > first,

[PATCH wayland] connection: remove redundant assignment

2016-04-22 Thread Marek Chalupa
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 --- src/connection.c | 1 - 1 file changed, 1 dele