A little more clarification
authorAlan T. DeKok <aland@freeradius.org>
Sat, 14 Feb 2015 02:13:37 +0000 (21:13 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 14 Feb 2015 02:13:37 +0000 (21:13 -0500)
src/lib/udpfromto.c

index 689d061..75c5c0e 100644 (file)
@@ -348,11 +348,13 @@ int sendfromto(int s, void *buf, size_t len, int flags,
                }
                break;
        }
-#else
+#endif /* !__FreeBSD__ */
 
        /*
         *      If the sendmsg() flags aren't defined, fall back to
-        *      using sendto().
+        *      using sendto().  These flags are defined on FreeBSD,
+        *      but laying it out this way simplifies the look of the
+        *      code.
         */
 #  if !defined(IP_PKTINFO) && !defined(IP_SENDSRCADDR)
        if (from && from->sa_family == AF_INET) {
@@ -365,7 +367,6 @@ int sendfromto(int s, void *buf, size_t len, int flags,
                from = NULL;
        }
 #  endif
-#endif /* !__FreeBSD__ */
 
        /*
         *      No "from", just use regular sendto.