upstream: Fix case of empty string domain.

Found by compiler note.

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Michael Adam 2017-11-16 01:53:21 +01:00
parent d97d486d53
commit 2e0250fbf1

View File

@ -91,7 +91,7 @@ static struct upstream *upstream_build (const char *host, int port, const char *
log_message (LOG_INFO, "Added no-upstream for %s", domain);
} else {
if (!host || host[0] == '\0' || port < 1 || !domain
|| domain == '\0') {
|| domain[0] == '\0') {
log_message (LOG_WARNING,
"Nonsense upstream rule: invalid parameters");
goto fail;