Re: [Openvpn-devel] [PATCH] Avoid using ~0

2012-03-29 Thread Alon Bar-Lev
On Thu, Mar 29, 2012 at 9:50 AM, Gert Doering wrote: > Hi, > > On Wed, Mar 28, 2012 at 08:44:18PM +0200, Alon Bar-Lev wrote: >> To avoid casting use two constants: >> 1. IPV4_NETMASK_HOST > > Fine with that one. > >> 2. dwMINUS_ONE > > I think this is way over board.  It should be possible to spel

Re: [Openvpn-devel] [PATCH] Avoid using ~0

2012-03-29 Thread Gert Doering
Hi, On Wed, Mar 28, 2012 at 08:44:18PM +0200, Alon Bar-Lev wrote: > To avoid casting use two constants: > 1. IPV4_NETMASK_HOST Fine with that one. > 2. dwMINUS_ONE I think this is way over board. It should be possible to spell "-1" as such - and it doesn't increase readability to introduce a M

[Openvpn-devel] [PATCH] Avoid using ~0

2012-03-28 Thread Alon Bar-Lev
To avoid casting use two constants: 1. IPV4_NETMASK_HOST 2. dwMINUS_ONE Signed-off-by: Alon Bar-Lev --- src/openvpn/basic.h |6 ++ src/openvpn/mroute.c |2 +- src/openvpn/pf.c |2 +- src/openvpn/route.c | 42 +- src/openvpn/route.h

Re: [Openvpn-devel] [PATCH] Avoid using ~0

2012-03-28 Thread Alon Bar-Lev
On Wed, Mar 28, 2012 at 9:17 PM, Fabian Knittel wrote: > Hi Alon, > > I stumbled over a minor mistake: > > 2012/3/28 Alon Bar-Lev : >> diff --git a/src/openvpn/route.c b/src/openvpn/route.c >> index bf7af63..05ea57f 100644 >> --- a/src/openvpn/route.c >> +++ b/src/openvpn/route.c >> @@ -1367,7 +13

Re: [Openvpn-devel] [PATCH] Avoid using ~0

2012-03-28 Thread Fabian Knittel
Hi Alon, I stumbled over a minor mistake: 2012/3/28 Alon Bar-Lev : > diff --git a/src/openvpn/route.c b/src/openvpn/route.c > index bf7af63..05ea57f 100644 > --- a/src/openvpn/route.c > +++ b/src/openvpn/route.c > @@ -1367,7 +1367,7 @@ add_route (struct route *r, >     else if ((flags & ROUTE_MET

[Openvpn-devel] [PATCH] Avoid using ~0

2012-03-28 Thread Alon Bar-Lev
To avoid casting use two constants: 1. IPV4_NETMASK_HOST 2. dwMINUS_ONE Signed-off-by: Alon Bar-Lev --- src/openvpn/basic.h |6 ++ src/openvpn/mroute.c |2 +- src/openvpn/pf.c |2 +- src/openvpn/route.c | 44 ++-- src/openvpn/route.