From badb6435d616066a8648152a24a09f9e090a6e5e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 16 Nov 2017 01:53:21 +0100 Subject: [PATCH] upstream: Fix case of empty string domain. Found by compiler note. Signed-off-by: Michael Adam --- src/upstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upstream.c b/src/upstream.c index 38afacd..327b727 100644 --- a/src/upstream.c +++ b/src/upstream.c @@ -124,7 +124,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;