Re: [Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-22 Thread Gert Doering
Hi, On Fri, Jun 23, 2017 at 12:08:05AM +0800, Antonio Quartulli wrote: > yeah...not sure we need to make some code a bit "obscure" if there is > really no need. It's only obscure if you forget that 2^0+2^1+2^(n-1) = (2^n)-1... :-) (Admittedly, it needed quite a bit of thinking at first glance)

Re: [Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-22 Thread Emmanuel Deloget
On Thu, Jun 22, 2017 at 6:08 PM, Antonio Quartulli wrote: > > On Thu, Jun 22, 2017 at 05:33:44PM +0200, Emmanuel Deloget wrote: > > Hi Antonio, Steffan, > > > > On Thu, Jun 22, 2017 at 3:31 PM, Antonio Quartulli wrote: > > > > > Thanks for sending v2 Steffan, > > > > > > On Wed, Jun 21, 2017 at 1

Re: [Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-22 Thread Antonio Quartulli
On Thu, Jun 22, 2017 at 05:33:44PM +0200, Emmanuel Deloget wrote: > Hi Antonio, Steffan, > > On Thu, Jun 22, 2017 at 3:31 PM, Antonio Quartulli wrote: > > > Thanks for sending v2 Steffan, > > > > On Wed, Jun 21, 2017 at 11:10:43PM +0200, Steffan Karger wrote: > > > From: Steffan Karger > > > >

Re: [Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-22 Thread Emmanuel Deloget
Hi Antonio, Steffan, On Thu, Jun 22, 2017 at 3:31 PM, Antonio Quartulli wrote: > Thanks for sending v2 Steffan, > > On Wed, Jun 21, 2017 at 11:10:43PM +0200, Steffan Karger wrote: > > From: Steffan Karger > > > > misc.c is a mess of incoherent functions, and is therefore included by > > virtual

Re: [Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-22 Thread Antonio Quartulli
Thanks for sending v2 Steffan, On Wed, Jun 21, 2017 at 11:10:43PM +0200, Steffan Karger wrote: > From: Steffan Karger > > misc.c is a mess of incoherent functions, and is therefore included by > virtually all our source files. That makes testing harder than it should > be. As a first step of c

[Openvpn-devel] [PATCH v2] Move adjust_power_of_2() to integer.h

2017-06-21 Thread Steffan Karger
From: Steffan Karger misc.c is a mess of incoherent functions, and is therefore included by virtually all our source files. That makes testing harder than it should be. As a first step of cleaning up misc.c, move adjust_power_of_2() to integer.h, which is a more suitable place for a function li