From: Arran Cudbard-Bell Date: Tue, 13 Jun 2017 20:42:41 +0000 (-0400) Subject: More nested preprocessor macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bfa97e4d4b345061b08d32adaec6f9489acfcfc;p=thirdparty%2Ffreeradius-server.git More nested preprocessor macros --- diff --git a/src/main/realms.c b/src/main/realms.c index 7d4cb792c72..90c2506440a 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -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, ""), -#ifdef WITH_TLS - home->tls ? "+tls" : "", -#else - "", -#endif + with_tls, home->port); return false;