]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
More nested preprocessor macros
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 13 Jun 2017 20:42:41 +0000 (16:42 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 13 Jun 2017 20:42:41 +0000 (16:42 -0400)
src/main/realms.c

index 7d4cb792c7227f1b7a44dbbb229c902583932fd9..90c2506440abc50c1c21607fc72a05b813c631ee 100644 (file)
@@ -536,8 +536,12 @@ bool realm_home_server_add(home_server_t *home)
        }
 
        if (!home->server && (rbtree_finddata(home_servers_byaddr, home) != NULL)) {
+               char const *with_tls = "";
                char buffer[INET6_ADDRSTRLEN];
 
+#ifdef WITH_TLS
+               if (home->tls) with_tls = "+tls";
+#endif
                inet_ntop(home->ipaddr.af, &home->ipaddr.addr, buffer, sizeof(buffer));
 
                cf_log_err(home->cs, "Duplicate home server address%s%s%s: %s:%s%s/%i",
@@ -546,11 +550,7 @@ bool realm_home_server_add(home_server_t *home)
                              home->name ? ")" : "",
                              buffer,
                              fr_int2str(fr_net_ip_proto_table, home->proto, "<INVALID>"),
-#ifdef WITH_TLS
-                             home->tls ? "+tls" : "",
-#else
-                             "",
-#endif
+                             with_tls,
                              home->port);
 
                return false;