From 39c29626cbf5cdce5d41d0301ba67eeced2a922a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Mar 2019 12:22:51 +0100 Subject: 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 --- lib/gopher.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/gopher.c') 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); -- cgit v1.2.3