aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_operhlp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
index 15eefabe7..4a13cf186 100644
--- a/src/tool_operhlp.c
+++ b/src/tool_operhlp.c
@@ -143,11 +143,9 @@ CURLcode get_url_file_name(char **filename, const char *url)
if(pc) {
/* duplicate the string beyond the slash */
pc++;
- if(*pc) {
- *filename = strdup(pc);
- if(!*filename)
- return CURLE_OUT_OF_MEMORY;
- }
+ *filename = strdup(pc);
+ if(!*filename)
+ return CURLE_OUT_OF_MEMORY;
}
/* in case we built debug enabled, we allow an environment variable