diff --git a/netwerk/base/src/nsStandardURL.cpp b/netwerk/base/src/nsStandardURL.cpp index 3abefbf00c3..2b021ca1be8 100644 --- a/netwerk/base/src/nsStandardURL.cpp +++ b/netwerk/base/src/nsStandardURL.cpp @@ -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