From: Daniel Stenberg Date: Mon, 4 Mar 2019 11:22:51 +0000 (+0100) Subject: gopher: remove check for path == NULL X-Git-Tag: curl-7_64_1~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39c29626cbf5cdce5d41d0301ba67eeced2a922a;p=curl gopher: remove check for path == NULL Since it can't be NULL and it makes Coverity believe we lack proper NULL checks. Verified by test 659, landed in commit 15401fa886b. Pointed out by Coverity CID 1442746. Assisted-by: Dan Fandrich Fixes #3617 Closes #3642 --- diff --git a/lib/gopher.c b/lib/gopher.c index 744d06ad7..b296c62d1 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -88,7 +88,10 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) *done = TRUE; /* unconditionally */ - if(path && query) + /* path is guaranteed non-NULL */ + DEBUGASSERT(path); + + if(query) gopherpath = aprintf("%s?%s", path, query); else gopherpath = strdup(path);