Re: [PATCH v1] net:tipc:Remove repeated initialization

From: Christophe JAILLET
Date: Thu Jul 06 2023 - 13:14:10 EST


Le 06/07/2023 à 17:47, Jakub Kicinski a écrit :
On Thu, 6 Jul 2023 21:42:09 +0800 Wang Ming wrote:
The original code initializes 'tmp' twice,
which causes duplicate initialization issue.
To fix this, we remove the second initialization
of 'tmp' and use 'parent' directly forsubsequent
operations.

Signed-off-by: Wang Ming <machel@xxxxxxxx>

Please stop sending the "remove repeated initialization" patches
to networking, thanks.



The patch also looks just bogus, as 'parent' is now always NULL when:
rb_link_node(&m->tree_node, parent, n);

is called after the while loop.

CJ