urlapi: part of conditional expression is always true: (relurl[0] == '/')

Fixes warning detected by PVS-Studio
Fixes #4374
This commit is contained in:
Daniel Stenberg 2019-09-19 10:18:28 +02:00
parent 8f593f6d3b
commit b10464399b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 1 deletions

View File

@ -351,7 +351,7 @@ static char *concat_url(const char *base, const char *relurl)
else {
/* We got a new absolute path for this server */
if((relurl[0] == '/') && (relurl[1] == '/')) {
if(relurl[1] == '/') {
/* the new URL starts with //, just keep the protocol part from the
original one */
*protsep = 0;