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
>
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,
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