Skip to content
Permalink
Browse files

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 15401fa.

Pointed out by Coverity CID 1442746.

Assisted-by: Dan Fandrich
Fixes #3617
Closes #3642
  • Loading branch information...
bagder committed Mar 4, 2019
1 parent dd7d710 commit 39c29626cbf5cdce5d41d0301ba67eeced2a922a
Showing with 4 additions and 1 deletion.
  1. +4 −1 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);

0 comments on commit 39c2962

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.