Re: [patch] /bin/cp: reduce scope variable

2020-02-02 Thread Theo de Raadt
>On Sat, Feb 01, 2020 at 04:57:26PM +0100, Ingo Schwarze wrote: >> Hi Jeremie, >> >> Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100: >> > On Fri, Jan 31 2020, Ingo Schwarze wrote: >> >> ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: >> >> >>> Reduce

Re: [patch] /bin/cp: reduce scope variable

2020-02-02 Thread Marc Espie
On Sat, Feb 01, 2020 at 04:57:26PM +0100, Ingo Schwarze wrote: > Hi Jeremie, > > Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100: > > On Fri, Jan 31 2020, Ingo Schwarze wrote: > >> ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: > > >>> Reduce scope of a

Re: [patch] /bin/cp: reduce scope variable

2020-02-01 Thread Ingo Schwarze
Hi Jeremie, Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100: > On Fri, Jan 31 2020, Ingo Schwarze wrote: >> ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: >>> Reduce scope of a few variables. >> No, this contradicts OpenBSD coding style. >> We want

Re: [patch] /bin/cp: reduce scope variable

2020-02-01 Thread Jeremie Courreges-Anglas
On Fri, Jan 31 2020, Ingo Schwarze wrote: > Hi, > > ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: > >> Reduce scope of a few variables. > > No, this contradicts OpenBSD coding style. > We want local variables declared up front in functions > such that you can see at one glance

Re: [patch] /bin/cp: reduce scope variable

2020-01-31 Thread Ingo Schwarze
Hi, ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: > Reduce scope of a few variables. No, this contradicts OpenBSD coding style. We want local variables declared up front in functions such that you can see at one glance which variables exist. > While here, remove an