BIND 10 trac991, updated. 378613249f14406399304f3464f249933108417b [991] Conditional assignment replaced with if else clause.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Apr 9 20:30:54 UTC 2013


The branch, trac991 has been updated
       via  378613249f14406399304f3464f249933108417b (commit)
      from  384a5661d18a3521169bc96d90b9bce087b0c62b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 378613249f14406399304f3464f249933108417b
Author: Marcin Siodelski <marcin at isc.org>
Date:   Tue Apr 9 22:30:40 2013 +0200

    [991] Conditional assignment replaced with if else clause.
    
    This overcomes the build failure on Solaris where it complains about
    incompatible types of ? operands.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/pkt_filter_inet.cc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc
index 0ab6e5c..f64c9ed 100644
--- a/src/lib/dhcp/pkt_filter_inet.cc
+++ b/src/lib/dhcp/pkt_filter_inet.cc
@@ -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) {



More information about the bind10-changes mailing list