From: Stephan Bosch Date: Mon, 11 Dec 2017 11:59:58 +0000 (+0100) Subject: lib-http: client: Cleaned up initialization of client settings. X-Git-Tag: 2.3.0.rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea4a85f5883baa653e8e60246c6ad570565cd831;p=thirdparty%2Fdovecot%2Fcore.git lib-http: client: Cleaned up initialization of client settings. There were checks for the client context not being NULL, which makes no sense anymore, since a private context is always created when none is provided. Problem reported by Coverity. --- diff --git a/src/lib-http/http-client.c b/src/lib-http/http-client.c index 561b7015c1..7bf58b317f 100644 --- a/src/lib-http/http-client.c +++ b/src/lib-http/http-client.c @@ -135,9 +135,8 @@ http_client_init_shared(struct http_client_context *cctx, } /* merge provided settings with context defaults */ - i_assert(cctx != NULL || set != NULL); client->set = cctx->set; - if (cctx != NULL && set != NULL) { + if (set != NULL) { if (set->user_agent != NULL && *set->user_agent != '\0') client->set.user_agent = p_strdup_empty(pool, set->user_agent); if (set->rawlog_dir != NULL && *set->rawlog_dir != '\0')