mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
Bug 620390 useless null check of host = flat.get() in nsStandardURL::SetHost
r=biesi
This commit is contained in:
parent
4d7b7faedc
commit
fde6f793e2
@ -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…
x
Reference in New Issue
Block a user