Bug 1393219 - Code clean-up: Style nits, typos and trailing spaces

Tag #1273
This commit is contained in:
Matt A. Tobin 2019-11-10 19:32:24 -05:00 committed by Roy Tam
commit c021f0c983
4 changed files with 107 additions and 109 deletions

View file

@ -2506,15 +2506,15 @@ nsAutoCString MsgExtractQueryPart(nsAutoCString spec, const char* queryToExtract
if (queryIndex == kNotFound)
return queryPart;
int32_t queryEnd = Substring(spec, queryIndex + 1).FindChar('&');
int32_t queryEnd = spec.FindChar('&', queryIndex + 1);
if (queryEnd == kNotFound)
queryEnd = Substring(spec, queryIndex + 1).FindChar('?');
queryEnd = spec.FindChar('?', queryIndex + 1);
if (queryEnd == kNotFound) {
// Nothing follows, so return from where the query qualifier started.
queryPart.Assign(Substring(spec, queryIndex));
} else {
// Return the substring that represents the query qualifier.
queryPart.Assign(Substring(spec, queryIndex, queryEnd + 1));
queryPart.Assign(Substring(spec, queryIndex, queryEnd - queryIndex));
}
return queryPart;
}