Removal of duplicate variable declarations in fe-connect.c

Started by Haribabu Kommiabout 7 years ago3 messageshackers
Jump to latest
#1Haribabu Kommi
kommi.haribabu@gmail.com

Hi Hackers,

During the development of another feature, I found that same local
variables are declared twice.
IMO, there is no need of again declaring the local variables. Patch
attached.

Regards,
Haribabu Kommi
Fujitsu Australia

Attachments:

0001-Removal-of-duplicate-local-variable-declaration.patchapplication/octet-stream; name=0001-Removal-of-duplicate-local-variable-declaration.patchDownload+0-4
#2Michael Paquier
michael@paquier.xyz
In reply to: Haribabu Kommi (#1)
Re: Removal of duplicate variable declarations in fe-connect.c

On Fri, Feb 22, 2019 at 11:33:17AM +1100, Haribabu Kommi wrote:

During the development of another feature, I found that same local
variables are declared twice.
IMO, there is no need of again declaring the local variables. Patch
attached.

Indeed, fixed. That's not a good practice, and each variable is
assigned in its own block before getting used, so there is no
overlap.
--
Michael

#3Haribabu Kommi
kommi.haribabu@gmail.com
In reply to: Michael Paquier (#2)
Re: Removal of duplicate variable declarations in fe-connect.c

On Fri, Feb 22, 2019 at 3:22 PM Michael Paquier <michael@paquier.xyz> wrote:

On Fri, Feb 22, 2019 at 11:33:17AM +1100, Haribabu Kommi wrote:

During the development of another feature, I found that same local
variables are declared twice.
IMO, there is no need of again declaring the local variables. Patch
attached.

Indeed, fixed. That's not a good practice, and each variable is
assigned in its own block before getting used, so there is no
overlap.

Thanks.

Regards,
Haribabu Kommi
Fujitsu Australia