mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 620390 useless null check of host = flat.get() in nsStandardURL::SetHost
r=biesi
This commit is contained in:
parent
0a36ca716b
commit
64666d52c4
@ -1428,7 +1428,7 @@ nsStandardURL::SetHost(const nsACString &input)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
if (host && strlen(host) < flat.Length())
|
||||
if (strlen(host) < flat.Length())
|
||||
return NS_ERROR_MALFORMED_URI; // found embedded null
|
||||
|
||||
// For consistency with SetSpec/nsURLParsers, don't allow spaces
|
||||
@ -1439,7 +1439,7 @@ nsStandardURL::SetHost(const nsACString &input)
|
||||
InvalidateCache();
|
||||
mHostEncoding = eEncoding_ASCII;
|
||||
|
||||
if (!(host && *host)) {
|
||||
if (!*host) {
|
||||
// remove existing hostname
|
||||
if (mHost.mLen > 0) {
|
||||
// remove entire authority
|
||||
|
Loading…
Reference in New Issue
Block a user