1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

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

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;