aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index e6451f242..62a4148c7 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2765,9 +2765,9 @@ static CURLcode CreateConnection(struct SessionHandle *data,
/* This is the default password, so DON'T set conn->bits.user_passwd */
}
else {
- /* store user + password */
- conn->user = user[0]?strdup(user):NULL;
- conn->passwd = passwd[0]?strdup(passwd):NULL;
+ /* store user + password, zero-length if not set */
+ conn->user = strdup(user);
+ conn->passwd = strdup(passwd);
}
/*************************************************************