Commit 37861324 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[991] Conditional assignment replaced with if else clause.

This overcomes the build failure on Solaris where it complains about
incompatible types of ? operands.
parent 384a5661
......@@ -54,7 +54,11 @@ int PktFilterInet::openSocket(const Iface&,
// If we are to receive broadcast messages we have to bind
// to "ANY" address.
addr4.sin_addr.s_addr = receive_bcast ? INADDR_ANY : htonl(addr);
if (receive_bcast) {
addr4.sin_addr.s_addr = INADDR_ANY;
} else {
addr4.sin_addr.s_addr = htonl(addr);
}
int sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment