aboutsummaryrefslogtreecommitdiff
path: root/lib/gopher.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-04 12:22:51 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-05 08:01:50 +0100
commit39c29626cbf5cdce5d41d0301ba67eeced2a922a (patch)
treecc2a1241ae1c6538bbc4268a560f94a3b2cd3760 /lib/gopher.c
parentdd7d7107c72ab977a55f6572b0a6843954ad50b9 (diff)
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
Diffstat (limited to 'lib/gopher.c')
-rw-r--r--lib/gopher.c5
1 files changed, 4 insertions, 1 deletions
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);