Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-15 Thread Antonio Quartulli
Hi Arne, better mark the patches with v2. They are also both missing the signed-off-by line. how about git format-patch -v2 -s -2 ? :) Cheers, On 15/08/2019 13:52, Arne Schwabe wrote: > Clang/Android complained > > warning: address of array 'rgi6->iface' will always evaluate to 'true' >

Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-13 Thread David Sommerseth
On 13/08/2019 23:46, Steffan Karger wrote: > Hi, > > On 13-08-19 23:31, Antonio Quartulli wrote: >> On 13/08/2019 23:26, David Sommerseth wrote: >>> wouldn't it be better to >>> do 'if (rgi6->iface[0])' instead? Since the buffer should be NULL >>> terminated >>> and has to be NULL terminted for

Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-13 Thread Steffan Karger
Hi, On 13-08-19 23:31, Antonio Quartulli wrote: > On 13/08/2019 23:26, David Sommerseth wrote: >> wouldn't it be better to >> do 'if (rgi6->iface[0])' instead? Since the buffer should be NULL terminated >> and has to be NULL terminted for strlen() to function anyhow. But the >> compiled code

Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-13 Thread Antonio Quartulli
Hi, On 13/08/2019 23:26, David Sommerseth wrote: > wouldn't it be better to > do 'if (rgi6->iface[0])' instead? Since the buffer should be NULL terminated > and has to be NULL terminted for strlen() to function anyhow. But the > compiled code would be a bit more efficient (even though, this

Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-13 Thread David Sommerseth
On 13/08/2019 11:03, Antonio Quartulli wrote: > Hi Arne, > > On 12/08/2019 15:45, Arne Schwabe wrote: >> Clang/Android complained >> >> warning: address of array 'rgi6->iface' will always evaluate to 'true' >> [-Wpointer-bool-conversion] >> if (rgi6->iface) >> >> iface is a char[16];

Re: [Openvpn-devel] [PATCH 1/2] Fix check if iface name is set

2019-08-13 Thread Antonio Quartulli
Hi Arne, On 12/08/2019 15:45, Arne Schwabe wrote: > Clang/Android complained > > warning: address of array 'rgi6->iface' will always evaluate to 'true' > [-Wpointer-bool-conversion] > if (rgi6->iface) > > iface is a char[16]; So its pointer is always true. > > we do a CLEAR(rgi6)