[haiku-commits] Re: haiku: hrev49266 - in src: bin add-ons/kernel/network/protocols/tcp

  • From: Augustin Cavalier <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 11 Jun 2015 09:43:36 -0400

On Thu, Jun 11, 2015 at 5:24 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:

The logic is indeed reversed; as the name MSG_NOSIGNAL suggests, the signal
should only be sent when this flag is not set.

Adrien fixed that in a later commit. I didn't know enough to try to fix it.

Also, you introduced extraneous parenthesis, please remove those again.

That was the *only* thing I added, and I added it because of this GCC warning:

home/builder/builds/haiku/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp:
In member function 'status_t TCPEndpoint::SendData(net_buffer*)':
/home/builder/builds/haiku/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp:799:44:
error: suggest parentheses around comparison in operand of '&'
[-Werror=parentheses]
if (gStackModule->is_syscall() && (flags & MSG_NOSIGNAL != 0))

That warning has fixed multiple bugs in the past for us, so I don't
think we should disable it.

-Augustin

Other related posts: