From 1c3e8bbfedcd3822aeb1bab22fb56c5ecff4295b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 14 Dec 2016 01:29:44 +0100 Subject: checksrc: warn for assignments within if() expressions ... they're already frowned upon in our source code style guide, this now enforces the rule harder. --- lib/cookie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/cookie.c') diff --git a/lib/cookie.c b/lib/cookie.c index 24db9c6fe..092a226f3 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -798,8 +798,8 @@ Curl_cookie_add(struct Curl_easy *data, /* Check if the domain is a Public Suffix and if yes, ignore the cookie. This needs a libpsl compiled with builtin data. */ if(domain && co->domain && !isip(co->domain)) { - if(((psl = psl_builtin()) != NULL) - && !psl_is_cookie_domain_acceptable(psl, domain, co->domain)) { + psl = psl_builtin(); + if(psl && !psl_is_cookie_domain_acceptable(psl, domain, co->domain)) { infof(data, "cookie '%s' dropped, domain '%s' must not set cookies for '%s'\n", co->name, domain, co->domain); -- cgit v1.2.3