Re: [Openvpn-devel] [PATCH 1/4] cleanup: avoid using ~0 - generic

2012-04-02 Thread David Sommerseth
On 29/03/12 11:16, Alon Bar-Lev wrote: > Use limits.h for maximum value. > > Signed-off-by: Alon Bar-Lev > --- > config-msvc.h |1 + > configure.ac |2 +- > src/openvpn/route.c |2 +- > src/openvpn/syshead.h |4 > 4 files changed, 7 insertions(+), 2 deleti

Re: [Openvpn-devel] [PATCH 1/4] cleanup: avoid using ~0 - generic

2012-04-01 Thread Gert Doering
Hi, On Sun, Apr 01, 2012 at 02:52:46PM +0300, Alon Bar-Lev wrote: > On Sun, Apr 1, 2012 at 2:37 PM, Gert Doering wrote: > > There is a similar bit of code in the win32 section, in > > get_default_gateway_row(): > > > > get_default_gateway_row (const MIB_IPFORWARDTABLE *routes) > > { > >  struct g

Re: [Openvpn-devel] [PATCH 1/4] cleanup: avoid using ~0 - generic

2012-04-01 Thread Alon Bar-Lev
On Sun, Apr 1, 2012 at 2:37 PM, Gert Doering wrote: > There is a similar bit of code in the win32 section, in > get_default_gateway_row(): > > get_default_gateway_row (const MIB_IPFORWARDTABLE *routes) > { >  struct gc_arena gc = gc_new (); >  DWORD lowest_metric = ~0; > > ... which might also be

Re: [Openvpn-devel] [PATCH 1/4] cleanup: avoid using ~0 - generic

2012-04-01 Thread Gert Doering
Hi, On Thu, Mar 29, 2012 at 11:16:39AM +0200, Alon Bar-Lev wrote: > Use limits.h for maximum value. > > Signed-off-by: Alon Bar-Lev I like this approach - it is a maximum value, so UINT_MAX is making this obvious. ACK. There is a similar bit of code in the win32 section, in get_default_gatew

[Openvpn-devel] [PATCH 1/4] cleanup: avoid using ~0 - generic

2012-03-29 Thread Alon Bar-Lev
Use limits.h for maximum value. Signed-off-by: Alon Bar-Lev --- config-msvc.h |1 + configure.ac |2 +- src/openvpn/route.c |2 +- src/openvpn/syshead.h |4 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config-msvc.h b/config-msvc.h index