* modules/ssl/ssl_util.c (ssl_util_vhostid): Simplify code,
no functional change.
char *ssl_util_vhostid(apr_pool_t *p, server_rec *s)
{
- char *id;
SSLSrvConfigRec *sc;
- char *host;
apr_port_t port;
- host = s->server_hostname;
if (s->port != 0)
port = s->port;
else {
sc = mySrvConfig(s);
- if (sc->enabled == TRUE)
- port = DEFAULT_HTTPS_PORT;
- else
- port = DEFAULT_HTTP_PORT;
+ port = sc->enabled == TRUE ? DEFAULT_HTTPS_PORT : DEFAULT_HTTP_PORT;
}
- id = apr_psprintf(p, "%s:%lu", host, (unsigned long)port);
- return id;
+
+ return apr_psprintf(p, "%s:%lu", s->server_hostname, (unsigned long)port);
}
/*
